From 8778628674f4405abafc061318d57852c240d25a Mon Sep 17 00:00:00 2001 From: DevopsGoth Date: Mon, 10 Apr 2023 17:05:38 -0600 Subject: [PATCH 1/4] embed remote integration tests --- .github/workflows/applications.yml | 42 ++++++++++++++++++------------ 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index 6584f02346..edb39978a8 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -725,23 +725,31 @@ jobs: # ########################################################################## # # Trigger Integration Tests Run + # integration-tests: + # name: Run Integration Tests from remote repo + # needs: [ config, docker-image ] + # runs-on: ubuntu-latest + # + # env: + # GIT_SHA_SHORT: ${{ needs.config.outputs.git-sha-short }} + # + # steps: + # - name: Start remote integration tests + # uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 + # with: + # workflow: Integration Tests on devnet chain + # token: ${{ secrets.GH_WORKFLOW_PAT_FOR_TESTS }} + # inputs: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' + # ref: refs/heads/master + # repo: kadena-io/integration-tests + # display-workflow-run-url: true + # wait-for-completion: false # here you could make this pipeline wait them out + integration-tests: - name: Run Integration Tests from remote repo + name: Run devnet integration tests needs: [ config, docker-image ] - runs-on: ubuntu-latest - - env: - GIT_SHA_SHORT: ${{ needs.config.outputs.git-sha-short }} - - steps: - - name: Start remote integration tests - uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 - with: - workflow: Integration Tests on devnet chain - token: ${{ secrets.GH_WORKFLOW_PAT_FOR_TESTS }} - inputs: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' - ref: refs/heads/master - repo: kadena-io/integration-tests - display-workflow-run-url: true - wait-for-completion: false # here you could make this pipeline wait them out + uses: kadena-io/integration-tests/.github/workflows/run_all_devnet_integration_tests.yml@master + with: + chainweb_node_container_id: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' + secrets: inherit From cbd6f2d42a759aeff41a7a0b43614e2a4155e8fc Mon Sep 17 00:00:00 2001 From: DevopsGoth Date: Wed, 10 May 2023 17:13:36 -0600 Subject: [PATCH 2/4] wait for completion of integration tests --- .github/workflows/applications.yml | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index edb39978a8..48ac10d890 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -725,31 +725,31 @@ jobs: # ########################################################################## # # Trigger Integration Tests Run - # integration-tests: - # name: Run Integration Tests from remote repo - # needs: [ config, docker-image ] - # runs-on: ubuntu-latest - # - # env: - # GIT_SHA_SHORT: ${{ needs.config.outputs.git-sha-short }} - # - # steps: - # - name: Start remote integration tests - # uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 - # with: - # workflow: Integration Tests on devnet chain - # token: ${{ secrets.GH_WORKFLOW_PAT_FOR_TESTS }} - # inputs: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' - # ref: refs/heads/master - # repo: kadena-io/integration-tests - # display-workflow-run-url: true - # wait-for-completion: false # here you could make this pipeline wait them out - integration-tests: - name: Run devnet integration tests + name: Run Integration Tests from remote repo needs: [ config, docker-image ] - uses: kadena-io/integration-tests/.github/workflows/run_all_devnet_integration_tests.yml@master - with: - chainweb_node_container_id: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' - secrets: inherit + runs-on: ubuntu-latest + + env: + GIT_SHA_SHORT: ${{ needs.config.outputs.git-sha-short }} + steps: + - name: Start remote integration tests + uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 + with: + workflow: Integration Tests on devnet chain + token: ${{ secrets.GH_WORKFLOW_PAT_FOR_TESTS }} + inputs: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' + ref: refs/heads/master + repo: kadena-io/integration-tests + display-workflow-run-url: true + wait-for-completion: true # here you could make this pipeline wait them out + # + # integration-tests: + # name: Run devnet integration tests + # needs: [ config, docker-image ] + # uses: kadena-io/integration-tests/.github/workflows/run_all_devnet_integration_tests.yml@master + # with: + # chainweb_node_container_id: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' + # secrets: inherit + # From f4f91f3e4a61520069db75ea235d65acff21c53c Mon Sep 17 00:00:00 2001 From: DevopsGoth Date: Wed, 10 May 2023 18:01:59 -0600 Subject: [PATCH 3/4] tag based integration test logic --- .github/workflows/applications.yml | 47 +++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index 48ac10d890..ea97953653 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -725,16 +725,22 @@ jobs: # ########################################################################## # # Trigger Integration Tests Run + # Tag check to see how we run these integration-tests: - name: Run Integration Tests from remote repo - needs: [ config, docker-image ] + name: Integration test suite + needs: [ config, docker-image ] runs-on: ubuntu-latest env: GIT_SHA_SHORT: ${{ needs.config.outputs.git-sha-short }} steps: - - name: Start remote integration tests + - uses: mukunku/tag-exists-action@v1.2.0 + id: tagcheck-needs-it + with: + tag: 'needs-integration-tests' + + - name: Devnet integration test suite uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 with: workflow: Integration Tests on devnet chain @@ -743,7 +749,40 @@ jobs: ref: refs/heads/master repo: kadena-io/integration-tests display-workflow-run-url: true - wait-for-completion: true # here you could make this pipeline wait them out + wait-for-completion: ${{ steps.tagcheck-needs-it.outputs.exists == 'true' }} + + mainnet-replay: + name: Mainnet pact history replay + needs: [ config, docker-image ] + runs-on: ubuntu-latest + + env: + GIT_SHA_SHORT: ${{ needs.config.outputs.git-sha-short }} + + steps: + + - uses: mukunku/tag-exists-action@v1.2.0 + id: tagcheck-wants-replay + with: + tag: 'wants-replay' + - uses: mukunku/tag-exists-action@v1.2.0 + id: tagcheck-needs-replay + with: + tag: 'needs-replay' + + - name: Full mainnet replay + if: ${{ steps.tagcheck-wants-replay.outputs.exists == 'true' }} + uses: aurelien-baudet/workflow-dispatch@93e95b157d791ae7f42aef8f8a0d3d723eba1c31 + with: + workflow: Mainnet Pact Replay + token: ${{ secrets.GH_WORKFLOW_PAT_FOR_TESTS }} + inputs: '{ "chainweb_node_container_id" : "sha-${{ needs.config.outputs.git-sha-short }}" }' + ref: refs/heads/master + repo: kadena-io/integration-tests + display-workflow-run-url: true + wait-for-completion: ${{ steps.tagcheck-needs-replay.outputs.exists == 'true' }} + + # # integration-tests: # name: Run devnet integration tests From 7fa21aa996cf3a4f618cd04fcfcc897034886cfc Mon Sep 17 00:00:00 2001 From: DevopsGoth Date: Wed, 10 May 2023 18:08:08 -0600 Subject: [PATCH 4/4] empty commit for tag testing