fix(ci): use bash shell on Windows for glob expansion in test steps
Windows PowerShell doesn't expand `tests/*.test.cjs` globs, causing the test runner to fail with "Could not find" on Windows Node 20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@@ -38,9 +38,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
# c8 v11 requires Node 20+ (engines: ^20.0.0 || >=22.0.0). Node 18 EOL April 2025.
|
# c8 v11 requires Node 20+ (engines: ^20.0.0 || >=22.0.0). Node 18 EOL April 2025.
|
||||||
|
# Use bash on all platforms so shell glob expansion works on Windows.
|
||||||
if: matrix.node-version != 18
|
if: matrix.node-version != 18
|
||||||
|
shell: bash
|
||||||
run: npm run test:coverage
|
run: npm run test:coverage
|
||||||
|
|
||||||
- name: Run tests (Node 18, coverage not supported)
|
- name: Run tests (Node 18, coverage not supported)
|
||||||
if: matrix.node-version == 18
|
if: matrix.node-version == 18
|
||||||
|
shell: bash
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|||||||
Reference in New Issue
Block a user