Skip to content

Commit

Permalink
[CI] Skip running tests if the PR is labeled 'pr-skip-test' (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia authored Apr 6, 2024
1 parent 93acb8d commit 84dee83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
types:
- opened
- synchronize
- labeled
- unlabeled
branches:
- main
paths:
Expand Down Expand Up @@ -42,7 +44,7 @@ jobs:
unit-tests:
if: |
(github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:'))
&& (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
&& (github.event_name != 'pull_request' || (github.event.pull_request.draft != true && !contains(github.event.pull_request.labels.*.name, 'pr-skip-test')))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:
functional-tests:
if: |
(github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:'))
&& (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
&& (github.event_name != 'pull_request' || (github.event.pull_request.draft != true && !contains(github.event.pull_request.labels.*.name, 'pr-skip-test')))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -114,7 +116,7 @@ jobs:
other-tests:
if: |
(github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'Bump version:'))
&& (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
&& (github.event_name != 'pull_request' || (github.event.pull_request.draft != true && !contains(github.event.pull_request.labels.*.name, 'pr-skip-test')))
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 84dee83

Please sign in to comment.