From 45c9359a0ff7d1b554eff9585f145cb4e3bcfd6b Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 09:42:10 +0000 Subject: [PATCH 1/9] only run e2e on R4R --- .github/workflows/e2e-fork.yml | 3 +-- .github/workflows/e2e.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index d035f438d71..83e64c9c786 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -25,12 +25,11 @@ jobs: run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT env: TEST_EXCLUSIONS: "TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite" - e2e: env: CHAIN_A_TAG: latest CHAIN_IMAGE: ibc-go-simd - if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} + if: ${{ (!github.event.pull_request.draft && github.event.pull_request.head.repo.fork) || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} needs: - build-test-matrix runs-on: ubuntu-latest diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 75c5a9e697f..baa0d1aa2d5 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -54,7 +54,7 @@ jobs: done e2e: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: - determine-image-tag - build-e2e # don't attempt any tests unless the e2e code compiles successfully. From f24c97b850ddf8327540c38347adbc3326894a94 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 09:56:51 +0000 Subject: [PATCH 2/9] use ready_for_review type --- .github/workflows/e2e-fork.yml | 3 ++- .github/workflows/e2e.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index 83e64c9c786..edbaa0660a6 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -2,6 +2,7 @@ name: Tests / E2E Fork on: workflow_dispatch: pull_request: + types: [ ready_for_review ] branches: - main paths-ignore: @@ -29,7 +30,7 @@ jobs: env: CHAIN_A_TAG: latest CHAIN_IMAGE: ibc-go-simd - if: ${{ (!github.event.pull_request.draft && github.event.pull_request.head.repo.fork) || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} + if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} needs: - build-test-matrix runs-on: ubuntu-latest diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index baa0d1aa2d5..864bf888d83 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -2,6 +2,7 @@ name: Tests / E2E on: workflow_dispatch: pull_request: + types: [ ready_for_review ] paths-ignore: - "docs/**" - "**.md" @@ -54,7 +55,7 @@ jobs: done e2e: - if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: - determine-image-tag - build-e2e # don't attempt any tests unless the e2e code compiles successfully. From 6021045b1e705c079a39820e660cd74136e2c228 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:02:42 +0000 Subject: [PATCH 3/9] use pull request target --- .github/workflows/e2e-fork.yml | 2 +- .github/workflows/e2e.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index edbaa0660a6..d035f438d71 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -2,7 +2,6 @@ name: Tests / E2E Fork on: workflow_dispatch: pull_request: - types: [ ready_for_review ] branches: - main paths-ignore: @@ -26,6 +25,7 @@ jobs: run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT env: TEST_EXCLUSIONS: "TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite" + e2e: env: CHAIN_A_TAG: latest diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 864bf888d83..d9d310f9073 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -1,7 +1,7 @@ name: Tests / E2E on: workflow_dispatch: - pull_request: + pull_request_target: types: [ ready_for_review ] paths-ignore: - "docs/**" From 6887da95e138281eb40e1e98b4b5c9e420167008 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:04:34 +0000 Subject: [PATCH 4/9] fix yaml syntax --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index d9d310f9073..a76e767f1a0 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -55,7 +55,7 @@ jobs: done e2e: - if: ${{ && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: - determine-image-tag - build-e2e # don't attempt any tests unless the e2e code compiles successfully. From e47734087438b3a4d963299fce55a68c286f21b8 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:06:11 +0000 Subject: [PATCH 5/9] trigger e2e From 70316e761a9c87e43da47c39d4038998daac7578 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:12:15 +0000 Subject: [PATCH 6/9] wip --- .github/workflows/e2e.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index a76e767f1a0..240ac0a621a 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -1,8 +1,12 @@ name: Tests / E2E on: workflow_dispatch: - pull_request_target: - types: [ ready_for_review ] + pull_request: + types: +# - opened +# - reopened +# - synchronize + - ready_for_review paths-ignore: - "docs/**" - "**.md" From 6b94095ce18b660d6ba4a15e8f8814ffadbdb3b4 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:16:42 +0000 Subject: [PATCH 7/9] use synchronize and ready_for_review types --- .github/workflows/e2e.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 240ac0a621a..aaab76af8c3 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -3,9 +3,9 @@ on: workflow_dispatch: pull_request: types: -# - opened -# - reopened -# - synchronize + # trigger workflow if changes are pushed to the branch. + - synchronize + # trigger workflow if PR is marked ready for review. - ready_for_review paths-ignore: - "docs/**" @@ -59,7 +59,9 @@ jobs: done e2e: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + # we will be running this job if the PR has not yet been marked for review, and we push additional changes. + # we skip the job in this case. + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: - determine-image-tag - build-e2e # don't attempt any tests unless the e2e code compiles successfully. From 021835c6ee3c33c61c5f486111a1578e58813a91 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:21:31 +0000 Subject: [PATCH 8/9] commit after marked for draft From 90d9c472bd8362dc22fa73d87cec098de19959a1 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 23 Mar 2023 10:30:11 +0000 Subject: [PATCH 9/9] skip all e2e jobs when the PR is in draft --- .github/workflows/e2e.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index aaab76af8c3..a4d497e1992 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -21,7 +21,7 @@ on: jobs: determine-image-tag: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest outputs: simd-tag: ${{ steps.get-tag.outputs.simd-tag }} @@ -42,7 +42,7 @@ jobs: fi build-e2e: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3