Skip to content

Commit 3dc049a

Browse files
committed
fixup! CI: R
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent a33e788 commit 3dc049a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
id: restore-pytest-cache
6969
with:
7070
path: .pytest_cache
71-
key: ${{ format('{0}-pytest-cache-{1}-{2}-{3}-{4}', runner.os, matrix.os, matrix.python, github.ref_name, github.run_number - 1) }}
71+
key: ${{ runner.os }}-pytest-cache-${{ matrix.os }}-${{ matrix.python }}-${{ github.ref_name }}
7272
restore-keys: |
7373
${{ runner.os }}-pytest-cache-${{ matrix.os }}-${{ matrix.python }}-${{ github.ref_name }}-
7474
@@ -87,6 +87,7 @@ jobs:
8787
8888
# Run nox session
8989
- name: Run nox
90+
id: nox-run
9091
env:
9192
NOX_SESSION: ${{ matrix.nox-session }}
9293
run: |
@@ -97,9 +98,9 @@ jobs:
9798
fi
9899
timeout-minutes: 10
99100

100-
# Save pytest cache only for pytest_min session
101+
# Save pytest cache only for pytest_min session and only on failure
101102
- name: Save pytest cache
102-
if: always() && matrix.nox-session == 'pytest_min'
103+
if: always() && steps.run-nox.outcome == 'failure' && matrix.nox-session == 'pytest_min'
103104
uses: actions/cache/save@v4
104105
with:
105106
path: .pytest_cache

0 commit comments

Comments
 (0)