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:
9
.github/workflows/smoke.yml
vendored
9
.github/workflows/smoke.yml
vendored
@@ -2,6 +2,10 @@
|
|||||||
#
|
#
|
||||||
# Called by other repos via workflow_call as a deploy gate.
|
# Called by other repos via workflow_call as a deploy gate.
|
||||||
# Secrets required: STAGING_WP_ADMIN_USER, STAGING_WP_ADMIN_PASSWORD
|
# 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)
|
name: Smoke Tests (Staging)
|
||||||
|
|
||||||
@@ -32,8 +36,11 @@ jobs:
|
|||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout peptide-e2e (explicit — workflow_call defaults to caller repo)
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: peptiderepo/peptide-e2e
|
||||||
|
ref: main
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user