Skip to content

Commit

Permalink
Fix cache errors in feature tests (#622)
Browse files Browse the repository at this point in the history
* Debug output

* Change cache key to commit hash
  • Loading branch information
EinKrebs authored Apr 17, 2024
1 parent 330fe39 commit 950bb8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ jobs:

- name: Check out code
uses: actions/checkout@v4

- id: step1
run: |
make split_feature_test
array=$(find test/feature/generatedFeatures -type f -exec wc -l {} \; | sort -rn | awk '{printf $0"\n"}' | python3 .github/scenario_balancer.py)
echo "features=$(echo "{\"command\": $array}")" >> $GITHUB_OUTPUT
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -96,7 +98,7 @@ jobs:
- name: Update env
run: |
SHARD_CACHE_KEY="spqr-shard-image-$(find docker/shard/ -type f -exec sha256sum '{}' \; | sha256sum | awk '{printf $1}')"
SHARD_CACHE_KEY="spqr-shard-image-$(git rev-parse HEAD)"
CACHE_FILE_SHARD="~/$SHARD_CACHE_KEY.tgz"
echo "SHARD_CACHE_KEY=$SHARD_CACHE_KEY" >> $GITHUB_ENV
echo "CACHE_FILE_SHARD=$CACHE_FILE_SHARD" >> $GITHUB_ENV
Expand Down Expand Up @@ -139,7 +141,7 @@ jobs:

- name: Update env
run: |
SHARD_CACHE_KEY="spqr-shard-image-$(find docker/shard/ -type f -exec sha256sum '{}' \; | sha256sum | awk '{printf $1}')"
SHARD_CACHE_KEY="spqr-shard-image-$(git rev-parse HEAD)"
CACHE_FILE_SHARD="~/$SHARD_CACHE_KEY.tgz"
echo "SHARD_CACHE_KEY=$SHARD_CACHE_KEY" >> $GITHUB_ENV
echo "CACHE_FILE_SHARD=$CACHE_FILE_SHARD" >> $GITHUB_ENV
Expand Down

0 comments on commit 950bb8b

Please sign in to comment.