Skip to content

Commit b43778a

Browse files
committed
Merge branch 'master' into ci/tests_refactor
2 parents b1c1781 + f6bf0ba commit b43778a

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ jobs:
9696
# call-qemu-tests:
9797
# uses: ./.github/workflows/qemu.yml@master
9898
# needs: [gen-matrix, call-build-tests]
99-
# strategy:
100-
# fail-fast: false
101-
# matrix:
102-
# type: ${{ fromJson(needs.gen-matrix.outputs.qemu-types) }}
103-
# chip: ['esp32', 'esp32c3']
99+
# if: false
100+
# strategy:
101+
# fail-fast: false
102+
# matrix:
103+
# type: ${{ fromJson(needs.gen-matrix.outputs.qemu-types) }}
104+
# chip: ['esp32', 'esp32c3']
104105
# with:
105106
# type: ${{ matrix.type }}
106107
# chip: ${{ matrix.chip }}
@@ -129,6 +130,8 @@ jobs:
129130
const sleep = ms => new Promise(r => setTimeout(r, ms));
130131
const sha = '${{ github.event.pull_request.head.sha || github.sha }}';
131132
const pr = '${{ github.event.pull_request.number }}';
133+
const ref = '${{ github.event.pull_request.number || github.ref }}';
134+
const regex = new RegExp("^tests-[\w]+-"+ref+"-", "m");
132135
133136
console.log(`PR: ${pr}, SHA: ${sha}`);
134137
@@ -142,12 +145,12 @@ jobs:
142145
}).then(caches => {
143146
if (caches) {
144147
for (const cache of caches) {
145-
if (cache.key.endsWith(sha) || (!pr && !cache.key.startsWith("tests-bin-"))) {
148+
if (cache.key.endsWith(sha) || !regex.test(cache.key) || (!pr && !cache.key.startsWith("tests-bin-"))) {
146149
console.log(`Skipping cache with key: ${cache.key}`);
147150
continue;
148151
}
149152
150-
console.log(`Deleting cache with key: ${cache.key}`);
153+
console.log(`Deleting cache: ${cache.key}`);
151154
152155
/*
153156
github.rest.actions.deleteActionsCacheById({

0 commit comments

Comments
 (0)