Skip to content

Commit b74d1fe

Browse files
committed
chore(ci): persist cache directory on CI failures
1 parent 9ee0036 commit b74d1fe

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

‎.github/workflows/main-checks.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ jobs:
6969
npx zakmes
7070
npx compas test
7171
72+
- name: Persist debug artifacts
73+
uses: actions/upload-artifact@v3
74+
if: failure()
75+
with:
76+
name:
77+
cache-artifact-test-${{ matrix.node }}-${{ matrix.postgresVersion }}
78+
path: .cache/
79+
7280
coverage:
7381
permissions:
7482
contents: read
@@ -104,6 +112,15 @@ jobs:
104112
run: |
105113
npx compas test --coverage
106114
115+
- name: Persist debug artifacts
116+
uses: actions/upload-artifact@v3
117+
if: failure()
118+
with:
119+
name:
120+
cache-artifact-coverage-${{ matrix.node }}-${{
121+
matrix.postgresVersion }}
122+
path: .cache/
123+
107124
- name: Upload coverage
108125
if: matrix.node == '18'
109126
uses: codecov/codecov-action@v3

‎.github/workflows/pr-checks.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ jobs:
9999
npx zakmes
100100
npx compas test
101101
102+
- name: Persist debug artifacts
103+
uses: actions/upload-artifact@v3
104+
if: failure()
105+
with:
106+
name:
107+
cache-artifact-test-${{ matrix.node }}-${{ matrix.postgresVersion }}
108+
path: .cache/
109+
102110
coverage:
103111
permissions:
104112
contents: read
@@ -134,6 +142,15 @@ jobs:
134142
run: |
135143
npx compas test --coverage
136144
145+
- name: Persist debug artifacts
146+
uses: actions/upload-artifact@v3
147+
if: failure()
148+
with:
149+
name:
150+
cache-artifact-coverage-${{ matrix.node }}-${{
151+
matrix.postgresVersion }}
152+
path: .cache/
153+
137154
- name: Upload coverage
138155
uses: codecov/codecov-action@v3
139156
with:

0 commit comments

Comments
 (0)