Skip to content

Commit b2242de

Browse files
DavertMikclaude
andcommitted
ci: self-link node_modules/codeceptjs to fix deps that import the package
@codeceptjs/configure and @codeceptjs/expect-helper both do top-level `import 'codeceptjs'`. Both passing through the test config (e.g. the `Expect: { require: '@codeceptjs/expect-helper' }` line in the acceptance configs) means CodeceptJS itself can't start in CI without node_modules/codeceptjs resolving — and the runtime deps load before any helper or test does, so disabling `codecept check` alone wasn't enough. Replace the previous `npm link && npm link codeceptjs` workaround with a single `ln -sfn .. node_modules/codeceptjs`. One symlink, no global npm state. Workflows updated: test, dtslint, playwright, puppeteer, webdriver, plugin. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 689b460 commit b2242de

6 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/dtslint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ jobs:
2828
env:
2929
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
3030
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
31+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
32+
- run: ln -sfn .. node_modules/codeceptjs
3133
- run: npm run def
3234
- run: npm run dtslint

.github/workflows/playwright.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
npm i --force
4141
env:
4242
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
43+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
44+
- run: ln -sfn .. node_modules/codeceptjs
4345
- name: Allow Release info Change
4446
run: |
4547
sudo apt-get update --allow-releaseinfo-change

.github/workflows/plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
npm i --force
4141
env:
4242
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
43+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
44+
- run: ln -sfn .. node_modules/codeceptjs
4345
- name: Allow Release info Change
4446
run: |
4547
sudo apt-get update --allow-releaseinfo-change

.github/workflows/puppeteer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
npm i --force && npm i puppeteer --force
4141
env:
4242
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
43+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
44+
- run: ln -sfn .. node_modules/codeceptjs
4345
- name: Start mock server
4446
run: nohup npm run mock-server:start &
4547
- name: Wait for mock server

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
env:
3333
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
3434
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
35+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
36+
- run: ln -sfn .. node_modules/codeceptjs
3537
- name: Start mock server
3638
run: nohup npm run mock-server:start &
3739
- name: Wait for mock server
@@ -72,6 +74,8 @@ jobs:
7274
env:
7375
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
7476
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
77+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
78+
- run: ln -sfn .. node_modules/codeceptjs
7579
- name: Start mock server
7680
run: nohup npm run mock-server:start &
7781
- name: Wait for mock server

.github/workflows/webdriver.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
env:
4242
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
4343
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
44+
# Self-link so deps that `import 'codeceptjs'` (configure, expect-helper) resolve.
45+
- run: ln -sfn .. node_modules/codeceptjs
4446
- name: Start mock server
4547
run: nohup npm run mock-server:start &
4648
- name: Wait for mock server

0 commit comments

Comments
 (0)