1212permissions :
1313 contents : read
1414
15+ concurrency :
16+ group : ${{ github.workflow }}-${{ github.ref }}
17+ cancel-in-progress : true
18+
1519env :
1620 FORCE_COLOR : 3
1721
1822jobs :
1923
2024 hypothesis :
2125 name : Slow Hypothesis Tests
26+ environment :
27+ name : codecov-upload
28+ deployment : false
2229 runs-on : " ubuntu-latest"
2330 defaults :
2431 run :
@@ -30,16 +37,20 @@ jobs:
3037 dependency-set : ["optional"]
3138
3239 steps :
33- - uses : actions/checkout@v6
40+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+ with :
42+ persist-credentials : false
3443 - name : Set HYPOTHESIS_PROFILE based on trigger
44+ env :
45+ EVENT_NAME : ${{ github.event_name }}
3546 run : |
36- if [[ "${{ github.event_name }} " == "schedule" || "${{ github.event_name }} " == "workflow_dispatch" ]]; then
47+ if [[ "$EVENT_NAME " == "schedule" || "$EVENT_NAME " == "workflow_dispatch" ]]; then
3748 echo "HYPOTHESIS_PROFILE=nightly" >> $GITHUB_ENV
3849 else
3950 echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
4051 fi
4152 - name : Set up Python
42- uses : actions/setup-python@v6
53+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4354 with :
4455 python-version : ${{ matrix.python-version }}
4556 cache : ' pip'
@@ -48,13 +59,15 @@ jobs:
4859 with :
4960 version : ' 1.16.5'
5061 - name : Set Up Hatch Env
62+ env :
63+ HATCH_ENV : test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
5164 run : |
52- hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
53- hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env
65+ hatch env create "$HATCH_ENV"
66+ hatch env run -e "$HATCH_ENV" list-env
5467 # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
5568 - name : Restore cached hypothesis directory
5669 id : restore-hypothesis-cache
57- uses : actions/cache/restore@v5
70+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5871 with :
5972 path : .hypothesis/
6073 key : cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
@@ -64,21 +77,23 @@ jobs:
6477 - name : Run slow Hypothesis tests
6578 if : success()
6679 id : status
80+ env :
81+ HATCH_ENV : test.py${{ matrix.python-version }}-${{ matrix.dependency-set }}
6782 run : |
6883 echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE"
69- hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-hypothesis
84+ hatch env run --env "$HATCH_ENV" run-hypothesis
7085
7186 # explicitly save the cache so it gets updated, also do this even if it fails.
7287 - name : Save cached hypothesis directory
7388 id : save-hypothesis-cache
7489 if : always() && steps.status.outcome != 'skipped'
75- uses : actions/cache/save@v5
90+ uses : actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
7691 with :
7792 path : .hypothesis/
7893 key : cache-hypothesis-${{ runner.os }}-${{ github.run_id }}
7994
8095 - name : Upload coverage
81- uses : codecov/codecov-action@v5
96+ uses : codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
8297 with :
8398 token : ${{ secrets.CODECOV_TOKEN }}
8499 flags : tests
90105 && steps.status.outcome == 'failure'
91106 && github.event_name == 'schedule'
92107 && github.repository_owner == 'zarr-developers'
93- uses : scientific-python/issue-from-pytest-log-action@v1
108+ uses : scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd # v1.5.0
94109 with :
95110 log-path : output-${{ matrix.python-version }}-log.jsonl
96111 issue-title : " Nightly Hypothesis tests failed"
0 commit comments