From 8bce1433f35627300975e44f82ed6c44562398ee Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 11:05:29 -0400 Subject: [PATCH 1/9] Add scheduled E2E test using latest services Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000000..09a7387642 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,31 @@ +name: Go + +on: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + e2e-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Update manifest to latest commit for every service + run: ./manifestgen.sh head + + - name: Run E2E tests + run: ./test/e2e/run.sh + + - name: Archive container logs + uses: actions/upload-artifact@v2 + if: always() + with: + name: container-logs + path: containerlogs/logs.txt From 7dd4167ff6fdeea7598e728cdce5b58c96ba5e07 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 11:07:22 -0400 Subject: [PATCH 2/9] Name new test GitHub Action Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 09a7387642..c603dba4cf 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,4 +1,4 @@ -name: Go +name: Latest Integration Test on: schedule: From a807e09c7ede89ae9d14c0a521763fdf8031313d Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 11:11:20 -0400 Subject: [PATCH 3/9] Test new GitHub action Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c603dba4cf..401e7a6db9 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,6 +1,8 @@ name: Latest Integration Test on: + push: + branches: [scheduled-e2e] schedule: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' From 9b476189cf172a122831e1487360e311c49157ad Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 12:43:32 -0400 Subject: [PATCH 4/9] Test both database types Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 401e7a6db9..dfd907a757 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -4,13 +4,22 @@ on: push: branches: [scheduled-e2e] schedule: - # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' workflow_dispatch: jobs: e2e-test: runs-on: ubuntu-latest + strategy: + matrix: + blockchain-provider: [geth, fabric] + database-type: [sqlite3, postgres] + test-suite: [TestEthereumE2ESuite] + include: + # Only when the blockchain provider is set to "fabric", use a different test suite + - blockchain-provider: fabric + test-suite: TestFabricE2ESuite + fail-fast: false steps: - uses: actions/checkout@v2 @@ -23,6 +32,10 @@ jobs: run: ./manifestgen.sh head - name: Run E2E tests + env: + TEST_SUITE: ${{ matrix.test-suite }} + BLOCKCHAIN_PROVIDER: ${{ matrix.blockchain-provider }} + DATABASE_TYPE: ${{matrix.database-type}} run: ./test/e2e/run.sh - name: Archive container logs From f4913ac2edd187e6884f972577fbace6e17e340d Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 12:50:36 -0400 Subject: [PATCH 5/9] Exclude invalid test suite/blockchain combinations Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index dfd907a757..ac2c128442 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -14,11 +14,12 @@ jobs: matrix: blockchain-provider: [geth, fabric] database-type: [sqlite3, postgres] - test-suite: [TestEthereumE2ESuite] - include: - # Only when the blockchain provider is set to "fabric", use a different test suite - - blockchain-provider: fabric + test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] + exclude: + - blockchain-provider: geth test-suite: TestFabricE2ESuite + - blockchain-provider: fabric + test-suite: TestEthereumE2ESuite fail-fast: false steps: - uses: actions/checkout@v2 From 2600cb6091aa3412e4a0dde6c212bb7073c9feb9 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 13:00:41 -0400 Subject: [PATCH 6/9] Skip core build for scheduled job Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ac2c128442..b8ecc5930c 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -32,11 +32,17 @@ jobs: - name: Update manifest to latest commit for every service run: ./manifestgen.sh head + - name: Pull latests FireFly build + run: | + docker pull ghcr.io/hyperledger/firefly:head + docker tag ghcr.io/hyperledger/firefly:head hyperledger/firefly + - name: Run E2E tests env: TEST_SUITE: ${{ matrix.test-suite }} BLOCKCHAIN_PROVIDER: ${{ matrix.blockchain-provider }} DATABASE_TYPE: ${{matrix.database-type}} + BUILD_FIREFLY: false run: ./test/e2e/run.sh - name: Archive container logs From 5f3a00315cc9c87ed90055b8086716ce5e327474 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 26 Oct 2021 14:02:43 -0400 Subject: [PATCH 7/9] Formatting consistency Signed-off-by: Nicko Guyer --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b8ecc5930c..695eac036e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -41,7 +41,7 @@ jobs: env: TEST_SUITE: ${{ matrix.test-suite }} BLOCKCHAIN_PROVIDER: ${{ matrix.blockchain-provider }} - DATABASE_TYPE: ${{matrix.database-type}} + DATABASE_TYPE: ${{ matrix.database-type }} BUILD_FIREFLY: false run: ./test/e2e/run.sh From 58f2085b646dd88cda81fbcba80e44871a6f071d Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Wed, 27 Oct 2021 15:42:18 -0400 Subject: [PATCH 8/9] Save container logs for each test iteration Signed-off-by: Nicko Guyer --- .github/workflows/go.yml | 4 ++-- .github/workflows/integration.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f35ae07ff5..d61430b278 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -28,9 +28,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] blockchain-provider: [geth, fabric] database-type: [sqlite3] - test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] exclude: - blockchain-provider: geth test-suite: TestFabricE2ESuite @@ -56,5 +56,5 @@ jobs: uses: actions/upload-artifact@v2 if: always() with: - name: container-logs + name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.database-type }} path: containerlogs/logs.txt diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 695eac036e..579ec6f7d5 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] blockchain-provider: [geth, fabric] database-type: [sqlite3, postgres] - test-suite: [TestEthereumE2ESuite, TestFabricE2ESuite] exclude: - blockchain-provider: geth test-suite: TestFabricE2ESuite @@ -49,5 +49,5 @@ jobs: uses: actions/upload-artifact@v2 if: always() with: - name: container-logs + name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.database-type }} path: containerlogs/logs.txt From 3dd2d67057e3a92e42694965feaa396652df252c Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Thu, 28 Oct 2021 09:42:57 -0400 Subject: [PATCH 9/9] Bump CLI version to v0.0.37 Signed-off-by: Nicko Guyer --- test/e2e/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/run.sh b/test/e2e/run.sh index f77ff457af..a6bcb0ccd7 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -67,7 +67,7 @@ if [ "$BUILD_FIREFLY" == "true" ]; then fi if [ "$DOWNLOAD_CLI" == "true" ]; then - go install github.com/hyperledger/firefly-cli/ff@v0.0.36 + go install github.com/hyperledger/firefly-cli/ff@v0.0.37 checkOk $? fi