|
1 | 1 | jobs: |
2 | | - complete_coveralls: |
| 2 | + eval-rules: |
| 3 | + name: Evaluate Rules |
| 4 | + outputs: |
| 5 | + should_run: ${{ steps.eval-rules.outputs.should_run }} |
| 6 | + runs-on: ubuntu-latest |
| 7 | + steps: |
| 8 | + - name: Eval Rules |
| 9 | + id: eval-rules |
| 10 | + env: |
| 11 | + SHOULD_RUN: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved' && github.event.pull_request.title == 'Update pre-commit hooks') }} |
| 12 | + run: echo "should_run=${SHOULD_RUN}" >> "$GITHUB_OUTPUT" |
| 13 | + complete-coveralls: |
| 14 | + if: needs.eval-rules.outputs.should_run == 'true' |
3 | 15 | needs: test-multi-python |
| 16 | + name: Check Coveralls |
4 | 17 | runs-on: ubuntu-latest |
5 | 18 | steps: |
6 | | - - name: Coveralls Finished |
| 19 | + - name: Coveralls |
7 | 20 | uses: coverallsapp/github-action@master |
8 | 21 | with: |
9 | 22 | github-token: ${{ secrets.GITHUB_TOKEN }} |
10 | 23 | parallel-finished: true |
11 | 24 | lint-multi-os: |
| 25 | + if: needs.eval-rules.outputs.should_run == 'true' |
12 | 26 | name: Lint ${{ matrix.os }} |
| 27 | + needs: eval-rules |
13 | 28 | runs-on: ${{ matrix.os }} |
14 | 29 | steps: |
15 | 30 | - uses: actions/checkout@v3 |
|
36 | 51 | matrix: |
37 | 52 | os: [ macOS-latest, ubuntu-latest, windows-latest ] |
38 | 53 | test-multi-os: |
| 54 | + if: needs.eval-rules.outputs.should_run == 'true' |
39 | 55 | name: Test ${{ matrix.os }} |
| 56 | + needs: eval-rules |
40 | 57 | runs-on: ${{ matrix.os }} |
41 | 58 | steps: |
42 | 59 | - uses: actions/checkout@v3 |
|
62 | 79 | matrix: |
63 | 80 | os: [ macOS-latest, ubuntu-latest, windows-latest ] |
64 | 81 | test-multi-python: |
| 82 | + if: needs.eval-rules.outputs.should_run == 'true' |
65 | 83 | name: Test Python ${{ matrix.python-version }} |
| 84 | + needs: eval-rules |
66 | 85 | runs-on: ubuntu-latest |
67 | 86 | steps: |
68 | 87 | - uses: actions/checkout@v3 |
|
95 | 114 | matrix: |
96 | 115 | python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] |
97 | 116 | test-network: |
98 | | - if: endsWith(inputs.package, 'praw') |
| 117 | + if: endsWith(inputs.package, 'praw') && needs.eval-rules.outputs.should_run == 'true' |
| 118 | + needs: eval-rules |
99 | 119 | name: Test Network Request |
100 | 120 | runs-on: ubuntu-latest |
101 | 121 | steps: |
|
0 commit comments