|
12 | 12 | permissions: |
13 | 13 | contents: read |
14 | 14 |
|
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
15 | 19 | env: |
16 | 20 | FORCE_COLOR: 3 |
17 | 21 |
|
|
34 | 38 | with: |
35 | 39 | persist-credentials: false |
36 | 40 | - name: Set HYPOTHESIS_PROFILE based on trigger |
| 41 | + env: |
| 42 | + EVENT_NAME: ${{ github.event_name }} |
37 | 43 | run: | |
38 | | - if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then |
| 44 | + if [[ "$EVENT_NAME" == "schedule" || "$EVENT_NAME" == "workflow_dispatch" ]]; then |
39 | 45 | echo "HYPOTHESIS_PROFILE=nightly" >> $GITHUB_ENV |
40 | 46 | else |
41 | 47 | echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV |
|
50 | 56 | with: |
51 | 57 | version: '1.16.5' |
52 | 58 | - name: Set Up Hatch Env |
| 59 | + env: |
| 60 | + HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} |
53 | 61 | run: | |
54 | | - hatch env create test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} |
55 | | - hatch env run -e test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} list-env |
| 62 | + hatch env create "$HATCH_ENV" |
| 63 | + hatch env run -e "$HATCH_ENV" list-env |
56 | 64 | # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache |
57 | 65 | - name: Restore cached hypothesis directory |
58 | 66 | id: restore-hypothesis-cache |
|
66 | 74 | - name: Run slow Hypothesis tests |
67 | 75 | if: success() |
68 | 76 | id: status |
| 77 | + env: |
| 78 | + HATCH_ENV: test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} |
69 | 79 | run: | |
70 | 80 | echo "Using Hypothesis profile: $HYPOTHESIS_PROFILE" |
71 | | - hatch env run --env test.py${{ matrix.python-version }}-${{ matrix.dependency-set }} run-hypothesis |
| 81 | + hatch env run --env "$HATCH_ENV" run-hypothesis |
72 | 82 |
|
73 | 83 | # explicitly save the cache so it gets updated, also do this even if it fails. |
74 | 84 | - name: Save cached hypothesis directory |
|
0 commit comments