ci: add temporary actions/cache smoke test
Cache smoke test / cache-write (push) Successful in 45s
Cache smoke test / cache-read (push) Failing after 24s

Verifying actions/cache is functional on this Gitea Actions runner
before building CI speed improvements on top of it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 21:13:07 +00:00
co-authored by Claude
parent 3ed8095263
commit 8ba4f2eecb
+40
View File
@@ -0,0 +1,40 @@
name: Cache smoke test
on:
push:
branches: [ci-cache-speedup]
jobs:
cache-write:
runs-on: ubuntu-latest
steps:
- name: Create cache payload
run: |
mkdir -p /tmp/cache-smoke
echo "hello-${{ github.run_id }}" > /tmp/cache-smoke/data.txt
- uses: actions/cache@v4
with:
path: /tmp/cache-smoke
key: cache-smoke-${{ github.run_id }}
cache-read:
runs-on: ubuntu-latest
needs: cache-write
steps:
- uses: actions/cache@v4
id: restore
with:
path: /tmp/cache-smoke
key: cache-smoke-${{ github.run_id }}
- name: Verify cache was restored
run: |
if [ "${{ steps.restore.outputs.cache-hit }}" != "true" ]; then
echo "cache-hit was not true: '${{ steps.restore.outputs.cache-hit }}'" >&2
exit 1
fi
test -f /tmp/cache-smoke/data.txt
cat /tmp/cache-smoke/data.txt
test "$(cat /tmp/cache-smoke/data.txt)" = "hello-${{ github.run_id }}"
echo "actions/cache works on this runner"