Skip to content

Commit 07a61d5

Browse files
committed
update test workflow to avoid running it several times
1 parent 5902fb8 commit 07a61d5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,25 @@ on:
1010
branches: [ master ]
1111

1212
jobs:
13+
pre_job:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
17+
steps:
18+
- id: skip_check
19+
uses: fkirc/skip-duplicate-actions@v5
20+
with:
21+
concurrent_skipping: same_content_newer
22+
skip_after_successful_duplicate: 'true'
1323
test:
14-
24+
needs: pre_job
25+
if: needs.pre_job.outputs.should_skip != 'true'
1526
timeout-minutes: 10
1627
runs-on: ubuntu-latest
1728
strategy:
1829
fail-fast: false
1930
matrix:
2031
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
21-
2232
steps:
2333
- uses: actions/checkout@v3
2434
- name: Start the Docker container with the test data

0 commit comments

Comments
 (0)