Ocelot-Social/.github/workflows/cache-verify.yml
Workflow config file is invalid. Please check your config file: yaml: line 17: did not find expected ',' or '}'
resonic-user 93048aabf4 verify
2025-06-16 10:21:23 +00:00

51 lines
1.5 KiB
YAML

name: CI Cache Verification
on:
push:
paths:
- '.github/workflows/cache-verify.yml'
workflow_dispatch:
jobs:
verify-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: echo "key=node-modules-${{ runner.os }}-${{ env.LOCK_HASH }}" >> $GITHUB_OUTPUT
id: cache-key
env: { LOCK_HASH: ${{ hashFiles('backend/yarn.lock', 'webapp/yarn.lock') }} }
- uses: actions/cache@v4
id: restore
with:
path: |
backend/node_modules
webapp/node_modules
key: ${{ steps.cache-key.outputs.key }}
restore-keys: |
node-modules-${{ runner.os }}-
node-modules-
- run: echo "Cache: ${{ steps.restore.outputs.cache-hit }}"
- run: cd backend && yarn install && yarn build
- run: cd webapp && yarn install && yarn build
verify-wait:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: cd webapp && yarn install && yarn build
- run: |
if [ -d webapp/out ]; then
npx serve -s webapp/out -l 3000 &
else
cd webapp && yarn start &
fi
- run: |
for i in {1..15}; do
curl -sf http://localhost:3000 && echo "✅ up" && exit 0
echo "$i..." && sleep 2
done
echo "❌ no response" && exit 1