fix(ci): correct working-directory — package-lock.json is at repo root, not e2e/

This commit is contained in:
peptiderepo
2026-04-27 12:27:49 +07:00
committed by peptiderepo
parent d46a1e4680
commit d781207252

View File

@@ -6,9 +6,9 @@
# - Manually via workflow_dispatch (run before any prod deploy)
# - Called by other repos via workflow_call (deploy gates)
#
# Secrets required (set in GitHub repo Settings → Secrets → Actions):
# STAGING_WP_ADMIN_USER — WordPress admin username on staging
# STAGING_WP_ADMIN_PASSWORD — WordPress admin password on staging
# Secrets required (set in GitHub repo Settings -> Secrets -> Actions):
# STAGING_WP_ADMIN_USER -- WordPress admin username on staging
# STAGING_WP_ADMIN_PASSWORD -- WordPress admin password on staging
name: Smoke Tests (Staging)
@@ -16,9 +16,9 @@ on:
workflow_dispatch:
inputs:
base_url:
description: 'Target URL (defaults to staging)'
description: "Target URL (defaults to staging)"
required: false
default: 'https://staging.peptiderepo.com'
default: "https://staging.peptiderepo.com"
# Allow other repos to call this workflow as a deploy gate
workflow_call:
@@ -26,7 +26,7 @@ on:
base_url:
type: string
required: false
default: 'https://staging.peptiderepo.com'
default: "https://staging.peptiderepo.com"
secrets:
STAGING_WP_ADMIN_USER:
required: true
@@ -46,22 +46,19 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: e2e/package-lock.json
node-version: "22"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install dependencies
working-directory: e2e
run: npm ci
- name: Install Playwright browsers
working-directory: e2e
run: npx playwright install chromium --with-deps
- name: Run smoke tests
working-directory: e2e
env:
BASE_URL: ${{ inputs.base_url || 'https://staging.peptiderepo.com' }}
BASE_URL: ${{ inputs.base_url || "https://staging.peptiderepo.com" }}
WP_ADMIN_USER: ${{ secrets.STAGING_WP_ADMIN_USER }}
WP_ADMIN_PASSWORD: ${{ secrets.STAGING_WP_ADMIN_PASSWORD }}
run: npx playwright test
@@ -71,7 +68,7 @@ jobs:
if: always()
with:
name: playwright-report
path: e2e/playwright-report/
path: playwright-report/
retention-days: 14
- name: Upload failure screenshots/videos
@@ -79,5 +76,5 @@ jobs:
if: failure()
with:
name: playwright-failures
path: e2e/test-results/
path: test-results/
retention-days: 7