Skip to content

Commit 07292a2

Browse files
authored
ci: add Windows CI tests (#2548)
1 parent 2e373b2 commit 07292a2

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ on:
99
jobs:
1010
test:
1111
name: Node.js Tests
12-
runs-on: ubuntu-latest
1312
strategy:
1413
matrix:
14+
os: [windows-latest, ubuntu-latest]
1515
node: [16.x, 18.x, 20.x, 22.x]
16+
runs-on: ${{ matrix.os }}
1617
steps:
1718
- uses: actions/checkout@v2
1819
with:

test/build.test.ts

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
import assert from "assert";
22
import { type Scenario, mapDirectory, runScenarios } from "./scenarios";
33

4-
const filesOwnName = await mapDirectory("test/fixtures/scenario_build_app");
4+
// Windows tests are disabled
5+
if (process.platform !== 'win32') {
56

6-
const scenarios: Scenario[] = [
7-
{
8-
files: filesOwnName,
9-
commands: ["jspm build --config rollup-config.mjs"],
10-
validationFn: async (files) => {
11-
const build = files.get("build.js");
12-
assert(!!build);
13-
assert(!build.includes('import { add } from "./utils.js"'));
14-
assert(build.includes("const add = (num1, num2) => num1 + num2"));
7+
const filesOwnName = await mapDirectory("test/fixtures/scenario_build_app");
8+
9+
const scenarios: Scenario[] = [
10+
{
11+
files: filesOwnName,
12+
commands: ["jspm build --config rollup-config.mjs"],
13+
validationFn: async (files) => {
14+
const build = files.get("build.js");
15+
assert(!!build);
16+
assert(!build.includes('import { add } from "./utils.js"'));
17+
assert(build.includes("const add = (num1, num2) => num1 + num2"));
18+
},
1519
},
16-
},
17-
];
20+
];
21+
22+
runScenarios(scenarios);
1823

19-
runScenarios(scenarios);
24+
}

0 commit comments

Comments
 (0)