Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed May 21, 2024
1 parent ddbc0bd commit bf9cc07
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:
name: Build tests
uses: ./.github/workflows/build_tests.yml
needs: gen-matrix
if: github.event.action != 'closed'
#if: github.event.action != 'closed'
if: false
strategy:
matrix:
type: ${{ fromJson(needs.gen-matrix.outputs.build-types) }}
Expand All @@ -64,7 +65,8 @@ jobs:
name: Run tests on hardware
uses: ./.github/workflows/hw.yml
needs: [gen-matrix, call-build-tests]
if: ${{ github.event_name != 'pull_request_target' || contains(github.event.pull_request.labels.*.name, 'hil_test') }}
#if: ${{ github.event_name != 'pull_request_target' || contains(github.event.pull_request.labels.*.name, 'hil_test') }}
if: false
strategy:
fail-fast: false
matrix:
Expand All @@ -78,7 +80,8 @@ jobs:
name: Run tests on Wokwi
uses: ./.github/workflows/wokwi.yml
needs: [gen-matrix, call-build-tests]
if: github.event.action != 'closed'
#if: github.event.action != 'closed'
if: false
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -137,41 +140,22 @@ jobs:
direction: 'asc',
key: 'tests-'
}).then(caches => {
console.log(caches);
});
/*
do {
// Fetch all cache entries for the repository
caches = await github.paginate(github.rest.actions.getActionsCacheList, {
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100,
sort: 'created_at',
direction: 'asc',
key: 'tests-'
});
} while(caches?.data?.actions_caches?.length > 0);
console.log(caches.data.actions_caches.map(cache => cache.key));
if (caches.data) {
// Delete matching caches
for (const cache of caches.data.actions_caches) {
if (caches) {
for (const cache of caches) {
if (cache.key.endsWith(sha) || (!pr && !cache.key.startsWith("tests-bin-"))) {
console.log(`Skipping cache with key: ${cache.key}`);
continue;
}
console.log(`Deleting cache with key: ${cache.key}`);
await github.rest.actions.deleteActionsCacheById({
/*
github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id
});
*/
}
await sleep(30000); // Sleep for 30 seconds to avoid rate limiting
}
} while(caches?.data?.actions_caches?.length > 0);
*/
});

0 comments on commit bf9cc07

Please sign in to comment.