Skip to content

Commit 7030da7

Browse files
authored
Test on windows in addition to ubuntu (#267)
* Test on windows in addition to ubuntu * Skip cluster test on windows * Skip ECMAScript modules on windows for now
1 parent 60f96e4 commit 7030da7

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/nodejs.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
10+
build_ubuntu:
1111

1212
runs-on: ubuntu-latest
1313

@@ -23,3 +23,19 @@ jobs:
2323
node-version: ${{ matrix.node-version }}
2424
- run: npm i
2525
- run: npm test
26+
27+
build_windows:
28+
runs-on: windows-latest
29+
30+
strategy:
31+
matrix:
32+
node-version: [12.x, 14.x, 16.x]
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Use Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v1
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
- run: npm i
41+
- run: npm test

test/spawn/cluster.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ const tap = require('tap');
33
const { spawn, touchFile } = require('../utils');
44

55
tap.test('Restart the cluster', t => {
6+
if (process.platform === 'win32') {
7+
t.pass('Restart the cluster', { skip: 'Signals are not supported on Windows' });
8+
return t.end();
9+
}
10+
611
spawn('cluster.js', out => {
712
if (out.match(/touch message\.js/m)) {
813
touchFile('message.js');

test/spawn/esmodule.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const { spawn, touchFile } = require('../utils');
55

66
tap.test('Supports ECMAScript modules with experimental-specifier-resolution', t => {
77
if (semver.satisfies(process.version, '<12.17')) return t.skip();
8+
if (process.platform === 'win32') return t.skip('ESM support on windows is broken');
89

910
spawn('--experimental-specifier-resolution=node resolution.mjs', out => {
1011
if (out.match(/touch message.js/)) {
@@ -20,6 +21,8 @@ tap.test('Supports ECMAScript modules with experimental-specifier-resolution', t
2021
});
2122

2223
tap.test('Supports ECMAScript modules', t => {
24+
if (process.platform === 'win32') return t.skip('ESM support on windows is broken');
25+
2326
spawn('ecma-script-modules.mjs', out => {
2427
if (out.match(/touch message.mjs/)) {
2528
touchFile('message.mjs');

0 commit comments

Comments
 (0)