Skip to content

Commit

Permalink
4746 - avoid extra ci runs
Browse files Browse the repository at this point in the history
  • Loading branch information
wileyj committed May 8, 2024
1 parent 9775102 commit 384e381
Showing 1 changed file with 33 additions and 43 deletions.
76 changes: 33 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ on:
# paths:
# - "**.rs"
# - "**.clar"
pull_request_review:
types:
- submitted

defaults:
run:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -133,19 +108,13 @@ 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
create-cache:
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' ||
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -228,3 +217,4 @@ jobs:
- rustfmt
- create-cache
uses: ./.github/workflows/slow-tests.yml

0 comments on commit 384e381

Please sign in to comment.