fix(ci): explicitly checkout peptide-e2e in workflow_call context

When smoke.yml runs via workflow_call from another repo (peptide-repo-core,
peptide-starter-theme, etc.), GitHub Actions checks out the CALLER's repo
by default. The caller has no package-lock.json, so setup-node's npm cache
lookup fails with 'Some specified paths were not resolved'.

Fix: add repository/ref to the checkout step so we always fetch peptide-e2e
regardless of who calls the workflow. This ensures npm ci and Playwright
have the correct test code and dependency lockfile.
This commit is contained in:
peptiderepo
2026-04-27 15:37:34 +00:00
parent ef7b705111
commit da79ee234f

View File

@@ -2,6 +2,10 @@
#
# Called by other repos via workflow_call as a deploy gate.
# Secrets required: STAGING_WP_ADMIN_USER, STAGING_WP_ADMIN_PASSWORD
#
# IMPORTANT: When called via workflow_call, GitHub Actions checks out the
# CALLER's repo by default, not peptide-e2e. We explicitly checkout
# peptide-e2e so npm ci and Playwright have the correct test code + lock file.
name: Smoke Tests (Staging)
@@ -32,8 +36,11 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
- name: Checkout peptide-e2e (explicit — workflow_call defaults to caller repo)
uses: actions/checkout@v4
with:
repository: peptiderepo/peptide-e2e
ref: main
- name: Set up Node.js
uses: actions/setup-node@v4