Skip to content

Commit d3aff32

Browse files
apartsinclaude
andcommitted
Fix CI/CD workflows to run from code/ subdirectory
All workflows were running npm commands from repo root which lacks the test scripts. Add working-directory: code defaults and cache-dependency-path for all jobs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9be2bf3 commit d3aff32

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: code
1215
steps:
1316
- uses: actions/checkout@v4
1417
- uses: actions/setup-node@v4
1518
with:
1619
node-version: 20
1720
cache: npm
21+
cache-dependency-path: code/package-lock.json
1822
- run: npm ci
1923
- run: npm run build
2024
- run: npm run lint
@@ -24,12 +28,16 @@ jobs:
2428
e2e:
2529
runs-on: ubuntu-latest
2630
needs: test
31+
defaults:
32+
run:
33+
working-directory: code
2734
steps:
2835
- uses: actions/checkout@v4
2936
- uses: actions/setup-node@v4
3037
with:
3138
node-version: 20
3239
cache: npm
40+
cache-dependency-path: code/package-lock.json
3341
- run: npm ci
3442
- run: npm run build
3543
- run: npx playwright install --with-deps chromium
@@ -38,4 +46,4 @@ jobs:
3846
if: failure()
3947
with:
4048
name: playwright-report
41-
path: playwright-report/
49+
path: code/playwright-report/

.github/workflows/deploy-production.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
1313
if: github.event.inputs.confirm == 'DEPLOY'
14+
defaults:
15+
run:
16+
working-directory: code
1417
steps:
1518
- uses: actions/checkout@v4
1619
- uses: actions/setup-node@v4
1720
with:
1821
node-version: 20
1922
cache: npm
23+
cache-dependency-path: code/package-lock.json
2024
- run: npm ci
2125
- run: npm run build
2226
- run: npm run test:unit

.github/workflows/deploy-staging.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: code
1013
steps:
1114
- uses: actions/checkout@v4
1215
- uses: actions/setup-node@v4
1316
with:
1417
node-version: 20
1518
cache: npm
19+
cache-dependency-path: code/package-lock.json
1620
- run: npm ci
1721
- run: npm run build
1822
- run: npm run test:unit

0 commit comments

Comments
 (0)