Skip to content

Commit

Permalink
dorothy-workflow: don't test PRs until review requested
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Sep 16, 2024
1 parent da3cf12 commit 38a6fc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/dorothy-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# don't use [shell: bash] unless needed, as for macos-fresh that caused an infinite queue for the test step, and for linux bash may not exist yet
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
name: dorothy-workflow
'on':
on:
- push
- pull_request
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
login-shells-and-linting:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && (github.event.pull_request.requested_reviewers || github.event.pull_request.requested_teams) ) }}
runs-on: ubuntu-latest
steps:
- name: 'Dorothy Install'
Expand Down Expand Up @@ -111,6 +112,7 @@ jobs:
run: dorothy check
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runner-test:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && (github.event.pull_request.requested_reviewers || github.event.pull_request.requested_teams) ) }}
strategy:
fail-fast: false
matrix:
Expand All @@ -125,6 +127,7 @@ jobs:
# ensure dorothy is cloned, and run command
bash -c "$(curl -fsSL 'https://dorothy.bevry.me/run?slug=${{ github.repository }}&commit=${{ github.event.pull_request.head.sha || github.sha }}')" -- dorothy test
fresh-macos-test:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && (github.event.pull_request.requested_reviewers || github.event.pull_request.requested_teams) ) }}
strategy:
fail-fast: false
matrix:
Expand All @@ -142,6 +145,7 @@ jobs:
# ensure dorothy is cloned, and run command
bash -c "$(curl -fsSL 'https://dorothy.bevry.me/run?slug=${{ github.repository }}&commit=${{ github.event.pull_request.head.sha || github.sha }}')" -- dorothy test
container-test:
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && (github.event.pull_request.requested_reviewers || github.event.pull_request.requested_teams) ) }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down

0 comments on commit 38a6fc9

Please sign in to comment.