From 6ee506113849501f1bc94925306b9fdc09d367a9 Mon Sep 17 00:00:00 2001 From: Tim Saucer Date: Mon, 20 May 2024 15:17:59 -0400 Subject: [PATCH] Add debug statement to review cache keys --- .github/workflows/test.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d46af9b84..47b1a7175 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -84,6 +84,26 @@ jobs: fail-on-cache-miss: true restore-keys: tpch-data- + - name: Test keys + run: | + gh extension install actions/gh-actions-cache + + echo "Fetching list of cache key" + cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) + + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeysForPR + do + echo $cacheKey + done + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge + - name: Setup Rust Toolchain uses: actions-rs/toolchain@v1 id: rust-toolchain