Skip to content

Commit a6c6b95

Browse files
MementoRCclaude
andcommitted
fix: add cache fallback to status workflow for complete CI resilience
Complete the GitHub Actions cache fallback implementation by updating the status.yml workflow with the same robust cache handling strategy used in other workflows. IMPROVEMENTS: - Add manual pixi installation fallback when cache service fails - Implement retry logic for dependency installation - Ensure status checks can run independently of GitHub cache service - Maintain consistency with other workflow cache handling patterns This completes the comprehensive cache service outage resilience across all GitHub Actions workflows, ensuring CI can function during GitHub infrastructure disruptions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bd66ecd commit a6c6b95

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

.github/workflows/status.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,49 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Setup pixi
17+
- name: Setup pixi with cache (attempt 1)
18+
id: setup-pixi-cache
1819
uses: prefix-dev/setup-pixi@v0.8.1
1920
with:
2021
pixi-version: v0.49.0
2122
cache: true
23+
continue-on-error: true
2224

23-
- name: Install dependencies
25+
- name: Verify Pixi installation or install manually if cache failed
26+
if: steps.setup-pixi-cache.outcome == 'failure' || (runner.os == 'Windows' && !contains(env.PATH, '.pixi\\bin')) || (runner.os != 'Windows' && !command -v pixi)
2427
run: |
25-
pixi install --locked
28+
echo "Pixi not found on PATH or setup-pixi-cache failed. Attempting manual installation."
29+
if [ "${{ runner.os }}" == "Windows" ]; then
30+
curl -L -o pixi.exe https://github.com/prefix-dev/pixi/releases/download/v0.49.0/pixi-x86_64-pc-windows-msvc.exe
31+
mkdir -p "$HOME/.pixi/bin"
32+
mv pixi.exe "$HOME/.pixi/bin/"
33+
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
34+
else
35+
curl -fsSL https://pixi.sh/install.sh | bash
36+
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
37+
fi
38+
echo "Pixi installed manually."
39+
40+
- name: Activate pixi environment and install dependencies (with retry)
41+
run: |
42+
eval "$(pixi shell --env-hook bash)"
43+
if ! command -v pixi &> /dev/null; then
44+
echo "Error: pixi command not found after activation. Environment setup failed."
45+
exit 1
46+
fi
47+
echo "Attempting to install pixi dependencies..."
48+
n=0
49+
until [ "$n" -ge 3 ]
50+
do
51+
pixi install --locked && break
52+
n=$((n+1))
53+
echo "pixi install failed, retrying ($n/3)..."
54+
sleep 5
55+
done
56+
if [ "$n" -ge 3 ]; then
57+
echo "Failed to install dependencies after multiple retries."
58+
exit 1
59+
fi
2660
2761
- name: Quick smoke test
2862
run: |
@@ -55,4 +89,4 @@ jobs:
5589
pixi run ruff check src/ --select=F,E9 --quiet || echo "⚠️ Some lint issues found"
5690
echo "✅ Critical lint check completed"
5791
58-
echo "🎉 Quick check passed!"
92+
echo "🎉 Quick check passed!"

0 commit comments

Comments
 (0)