From 384e381fd72377e94c32cdb41a4bb2e0659a24b7 Mon Sep 17 00:00:00 2001 From: wileyj <2847772+wileyj@users.noreply.github.com> Date: Wed, 8 May 2024 09:17:30 -0700 Subject: [PATCH 1/2] 4746 - avoid extra ci runs --- .github/workflows/ci.yml | 76 +++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93201a153..d028ac1ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,9 +31,6 @@ on: # paths: # - "**.rs" # - "**.clar" - pull_request_review: - types: - - submitted defaults: run: @@ -55,15 +52,6 @@ jobs: ## - PR review comment ## - PR change is requested rustfmt: - if: | - !( - github.event_name == 'pull_request_review' && - github.event.action == 'submitted' && - ( - github.event.review.state == 'commented' || - github.event.review.state == 'changes_requested' - ) - ) name: Rust Format runs-on: ubuntu-latest steps: @@ -104,22 +92,9 @@ jobs: ## ## Runs when: ## - tag is not provided - ## and the following are not true: - ## - PR review submitted (not approved) - ## and any of: - ## - PR review comment - ## - PR change is requested docker-image: if: | - inputs.tag == '' && - !( - github.event_name == 'pull_request_review' && - github.event.action == 'submitted' && - ( - github.event.review.state == 'commented' || - github.event.review.state == 'changes_requested' - ) - ) + inputs.tag == '' name: Docker Image (Source) uses: ./.github/workflows/image-build-source.yml needs: @@ -133,7 +108,6 @@ jobs: ## or: ## - no tag provided ## and any of: - ## - PR is approved (any approval will trigger) ## - this workflow is called manually ## - PR is opened ## - commit to either (development, master) branch @@ -141,11 +115,6 @@ jobs: if: | inputs.tag != '' || ( inputs.tag == '' && ( - ( - github.event_name == 'pull_request_review' && - github.event.action == 'submitted' && - github.event.review.state == 'approved' - ) || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || github.event_name == 'merge_group' || @@ -168,16 +137,28 @@ jobs: ## ## Runs when: ## - tag is provided - ## either or of the following: - ## - tag is not provided - ## - PR is approved + ## or: + ## - no tag provided + ## and any of: + ## - this workflow is called manually + ## - PR is opened + ## - PR added to merge queue + ## - commit to either (development, next, master) branch stacks-core-tests: if: | inputs.tag != '' || ( - inputs.tag == '' || ( - github.event_name == 'pull_request_review' && - github.event.action == 'submitted' && - github.event.review.state == 'approved' + inputs.tag == '' && ( + github.event_name == 'workflow_dispatch' || + github.event_name == 'pull_request' || + github.event_name == 'merge_group' || + ( + contains(' + refs/heads/master + refs/heads/develop + refs/heads/next + ', github.event.pull_request.head.ref) && + github.event_name == 'push' + ) ) ) name: Stacks Core Tests @@ -189,10 +170,18 @@ jobs: bitcoin-tests: if: | inputs.tag != '' || ( - inputs.tag == '' || ( - github.event_name == 'pull_request_review' && - github.event.action == 'submitted' && - github.event.review.state == 'approved' + inputs.tag == '' && ( + github.event_name == 'workflow_dispatch' || + github.event_name == 'pull_request' || + github.event_name == 'merge_group' || + ( + contains(' + refs/heads/master + refs/heads/develop + refs/heads/next + ', github.event.pull_request.head.ref) && + github.event_name == 'push' + ) ) ) name: Bitcoin Tests @@ -228,3 +217,4 @@ jobs: - rustfmt - create-cache uses: ./.github/workflows/slow-tests.yml + From 2a729d32c1e358fcfa4315abc1b7070b003dad63 Mon Sep 17 00:00:00 2001 From: wileyj <2847772+wileyj@users.noreply.github.com> Date: Wed, 8 May 2024 09:33:58 -0700 Subject: [PATCH 2/2] remove paths-ignore --- .github/workflows/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d028ac1ef..39048dc01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,13 +24,6 @@ on: - reopened - synchronize - ready_for_review - paths-ignore: - - "**.md" - - "**.yml" - ## might be better to use inclusive v exclusive paths here, ex: - # paths: - # - "**.rs" - # - "**.clar" defaults: run: