mirror of
https://github.com/redwoodjs/local-ci.git
synced 2026-09-19 07:54:29 +08:00
ad7482fcac
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
63 lines
2.5 KiB
YAML
63 lines
2.5 KiB
YAML
name: Cache Tests
|
|
|
|
# Exercises the warm node_modules bind-mount on the local (agent-ci) runner.
|
|
# Three parallel jobs all run pnpm install simultaneously. Without the warm cache:
|
|
# - First run: one job warms node_modules alone, then the other two run in parallel
|
|
# - Subsequent runs: all three start in parallel immediately (node_modules already warm)
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [labeled, synchronize]
|
|
|
|
jobs:
|
|
install-a:
|
|
if: '!github.event.pull_request.draft && (contains(fromJSON(''["MEMBER", "OWNER", "COLLABORATOR"]''), github.event.pull_request.author_association) || contains(github.event.pull_request.labels.*.name, ''safe-to-run''))'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.30.1
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: "pnpm"
|
|
- run: pnpm install
|
|
- run: echo "✅ install-a complete — node_modules present $(ls node_modules | wc -l | tr -d ' ') packages"
|
|
|
|
install-b:
|
|
if: '!github.event.pull_request.draft && (contains(fromJSON(''["MEMBER", "OWNER", "COLLABORATOR"]''), github.event.pull_request.author_association) || contains(github.event.pull_request.labels.*.name, ''safe-to-run''))'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.30.1
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: "pnpm"
|
|
- run: pnpm install
|
|
- run: echo "✅ install-b complete — node_modules present $(ls node_modules | wc -l | tr -d ' ') packages"
|
|
|
|
install-c:
|
|
if: '!github.event.pull_request.draft && (contains(fromJSON(''["MEMBER", "OWNER", "COLLABORATOR"]''), github.event.pull_request.author_association) || contains(github.event.pull_request.labels.*.name, ''safe-to-run''))'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.30.1
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: "pnpm"
|
|
- run: pnpm install
|
|
- run: echo "✅ install-c complete — node_modules present $(ls node_modules | wc -l | tr -d ' ') packages"
|