Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,39 @@ env:
PIXI_VERSION: "v0.63.0"

jobs:
# TODO: Add a job that clears the GitHub cache
clear-cache:
runs-on: ubuntu-slim
permissions:
actions: write
steps:
- name: Clear pixi-lock cache entries
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "Clearing pixi-lock-* cache entries"
gh cache list --repo ${{ github.repository }} --json key --jq '.[].key' | grep '^pixi-lock_' | while read -r key; do
echo "Deleting cache: $key"
for attempt in 1 2 3; do
if gh cache delete "$key" --repo ${{ github.repository }}; then
break
fi
echo "Attempt $attempt failed, retrying in 5 seconds..."
sleep 5
done
done
sleep 5
echo "Verifying all caches are cleared..."
remaining=$(gh cache list --repo ${{ github.repository }} --json key --jq '.[].key' | grep '^pixi-lock_' || true)
if [ -n "$remaining" ]; then
echo "Error: Some caches still exist:"
echo "$remaining"
exit 1
fi
echo "Cache cleared"

cache-pixi-lock:
runs-on: ubuntu-latest
needs: clear-cache
runs-on: ubuntu-slim
outputs:
cache-key: ${{ steps.create-and-cache.outputs.cache-key }}
pixi-version: ${{ steps.create-and-cache.outputs.pixi-version }}
Expand Down Expand Up @@ -52,7 +82,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-slim, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand Down
Loading