File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed
Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,15 @@ name: Run tests
22
33# Controls when the workflow will run
44on :
5- # Triggers the workflow on push or pull request events but only for the master branch
5+ # Triggers the workflow on push or pull request events but only for important files
66 push :
7+ branches :
8+ - master
9+ paths :
10+ - " dpath/"
11+ - " **.py"
12+ - " tox.ini"
13+ pull_request :
714 paths :
815 - " dpath/"
916 - " **.py"
1421
1522# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1623jobs :
17- # This workflow contains a single job called "tests"
24+ # Generate a common hashseed for all tests
25+ generate-hashseed :
26+ runs-on : ubuntu-latest
27+
28+ outputs :
29+ hashseed : ${{ steps.generate.outputs.hashseed }}
30+
31+ steps :
32+ - name : Generate Hashseed
33+ id : generate
34+ run : |
35+ python -c "from random import randint;
36+ hashseed = randint(0, 4294967295)
37+ print(f'{hashseed=}')
38+ print(f'::set-output name=hashseed::{hashseed}')"
39+
40+ # Tests job
1841 tests :
1942 # The type of runner that the job will run on
2043 runs-on : ubuntu-latest
2144
45+ needs : generate-hashseed
46+
2247 strategy :
2348 matrix :
2449 # Match versions specified in tox.ini
3863 - name : Run tox with tox-gh-actions
3964 uses : ymyzk/run-tox-gh-actions@main
4065 with :
41- tox-args : -vv
66+ tox-args : -vv --hashseed=${{ needs.generate-hashseed.outputs.hashseed }}
You can’t perform that action at this time.
0 commit comments