Skip to content

Commit

Permalink
Merge pull request stacks-network#4766 from stacks-network/fix/reduce…
Browse files Browse the repository at this point in the history
…_ci_runs-master

[CI] 4746 - Avoid extraneous CI runs (master)
  • Loading branch information
wileyj authored May 9, 2024
2 parents 9775102 + 2a729d3 commit b7f7295
Showing 1 changed file with 33 additions and 50 deletions.
83 changes: 33 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +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"
pull_request_review:
types:
- submitted

defaults:
run:
Expand All @@ -55,15 +45,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 +85,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 +101,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 +130,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 +163,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 +210,4 @@ jobs:
- rustfmt
- create-cache
uses: ./.github/workflows/slow-tests.yml

0 comments on commit b7f7295

Please sign in to comment.