mirror of
https://github.com/redwoodjs/local-ci.git
synced 2026-09-19 07:54:29 +08:00
ef7029adf3
Replace mutable tag refs (@v4, @v5, @v1, @main) with 40-char commit SHAs and a trailing `# vX.Y.Z` comment, per GitHub's hardening guidance. Covers .github/workflows/, .docs/marketing/demo-recording/, and the skill-evals fixture repos. Embedded YAML inside heredocs is also pinned. No packages/ code changes, so no changeset.
63 lines
2.9 KiB
YAML
63 lines
2.9 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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
|
|
with:
|
|
version: 10.30.1
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
|
|
with:
|
|
version: 10.30.1
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
|
|
with:
|
|
version: 10.30.1
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
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"
|