ci: switch smoke test to actions/upload-artifact + download-artifact
Cache smoke test / artifact-write (push) Failing after 5s
Cache smoke test / artifact-read (push) Has been skipped

actions/cache is confirmed broken on this Gitea Actions runner (both
save and restore time out against /_apis/artifactcache/*). Testing
whether the separate artifact-upload API path works instead, as a
fallback basis for the CI restructuring.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 21:16:35 +00:00
co-authored by Claude
parent 8ba4f2eecb
commit 32ba731d88
+17 -22
View File
@@ -5,36 +5,31 @@ on:
branches: [ci-cache-speedup]
jobs:
cache-write:
artifact-write:
runs-on: ubuntu-latest
steps:
- name: Create cache payload
- name: Create artifact payload
run: |
mkdir -p /tmp/cache-smoke
echo "hello-${{ github.run_id }}" > /tmp/cache-smoke/data.txt
mkdir -p /tmp/artifact-smoke
echo "hello-${{ github.run_id }}" > /tmp/artifact-smoke/data.txt
- uses: actions/cache@v4
- uses: actions/upload-artifact@v4
with:
path: /tmp/cache-smoke
key: cache-smoke-${{ github.run_id }}
name: artifact-smoke-${{ github.run_id }}
path: /tmp/artifact-smoke
cache-read:
artifact-read:
runs-on: ubuntu-latest
needs: cache-write
needs: artifact-write
steps:
- uses: actions/cache@v4
id: restore
- uses: actions/download-artifact@v4
with:
path: /tmp/cache-smoke
key: cache-smoke-${{ github.run_id }}
name: artifact-smoke-${{ github.run_id }}
path: /tmp/artifact-smoke
- name: Verify cache was restored
- name: Verify artifact 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"
test -f /tmp/artifact-smoke/data.txt
cat /tmp/artifact-smoke/data.txt
test "$(cat /tmp/artifact-smoke/data.txt)" = "hello-${{ github.run_id }}"
echo "actions/upload-artifact + download-artifact work on this runner"