diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 260d6102..8d797c40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: build on: push: branches: - - 'main' + - main tags: - 'v*' pull_request: @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - @@ -33,4 +33,4 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..15052090 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,66 @@ +name: build + +on: + pull_request: + +permissions: + contents: write + +jobs: + e2e-test: + runs-on: ubuntu-latest + strategy: + matrix: + test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] + blockchain-provider: [geth, fabric] + token-provider: [none, erc1155, erc20_erc721] + database-type: [sqlite3, postgres] + exclude: + - blockchain-provider: geth + test-suite: TestFabricE2ESuite + - blockchain-provider: fabric + test-suite: TestEthereumE2ESuite + - blockchain-provider: fabric + token-provider: erc1155 + - blockchain-provider: fabric + token-provider: erc20_erc721 + - blockchain-provider: geth + token-provider: none + fail-fast: false + steps: + - name: Checkout FireFly CLI + uses: actions/checkout@v3 + with: + path: firefly-cli + fetch-depth: 0 + - name: Checkout FireFly Core repo + uses: actions/checkout@v3 + with: + repository: hyperledger/firefly + path: firefly + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Compile FireFly CLI + working-directory: firefly-cli + run: make install + + - name: Run E2E tests + working-directory: firefly + env: + TEST_SUITE: ${{ matrix.test-suite }} + BLOCKCHAIN_PROVIDER: ${{ matrix.blockchain-provider }} + TOKENS_PROVIDER: ${{ matrix.token-provider }} + DATABASE_TYPE: ${{ matrix.database-type }} + DOWNLOAD_CLI: false + run: ./test/e2e/run.sh + + - name: Archive container logs + uses: actions/upload-artifact@v2 + if: always() + with: + name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.database-type }}-${{ matrix.token-provider }} + path: containerlogs/logs.txt