mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-19 16:55:02 +02:00
ci: Install root typescript for the workflow scripts test job
The job sweeps scripts/*.test.mjs into the .github/scripts test run but installs only the .github/scripts dependencies. env-vars-manifest.mjs imports typescript, so its test failed with ERR_MODULE_NOT_FOUND. Install just typescript at the repo root, pinned to the root package.json version, so the suite keeps its scoped install.
This commit is contained in:
parent
ed6373c77c
commit
e4b3e798fc
|
|
@ -33,6 +33,16 @@ jobs:
|
|||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --lockfile-dir ${{ github.workspace }}/.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
# Tests under scripts/ may need root devDependencies (for example
|
||||
# typescript for scripts/env-vars-manifest.mjs); the scoped install
|
||||
# above only covers .github/scripts. Install just typescript into
|
||||
# scripts/, pinned to the root package.json version. npm cannot
|
||||
# install at the repo root (workspace: protocol in devDependencies).
|
||||
- name: Install root script dependencies
|
||||
run: |
|
||||
VERSION=$(node -p "require('./package.json').devDependencies.typescript")
|
||||
npm install --no-save --no-package-lock --ignore-scripts --prefix scripts "typescript@${VERSION}"
|
||||
|
||||
- name: Run tests
|
||||
id: run-tests
|
||||
run: npm test --prefix=.github/scripts
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user