Skip to content

Commit 9138e72

Browse files
authored
Improve CI settings (#594)
* ci: change mac and windows to only test nodejs@latest One version is enough to test for each OS. Testing for each version of nodejs is done only on Ubuntu. * ci: extend the time as it often times out
1 parent bcb7bf7 commit 9138e72

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/workflows/workflow.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: Node CI
33
on: [push, pull_request]
44

55
jobs:
6-
test:
7-
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
8-
runs-on: ${{ matrix.os }}
6+
ubuntu-test:
7+
name: Test on node ${{ matrix.node-version }} and Ubuntu
8+
runs-on: ubuntu-latest
99
strategy:
1010
fail-fast: false
1111
matrix:
1212
node-version: [12.x, 14.x, 16.x, 17.x]
13-
os: [ubuntu-latest, windows-latest, macos-latest]
1413
steps:
1514
- uses: actions/checkout@v2
1615
- uses: actions/setup-node@v2
@@ -22,3 +21,22 @@ jobs:
2221
- run: npm -v
2322
- run: npm ci
2423
- run: npm test
24+
25+
mac-and-windows-test:
26+
name: Test on node latest and ${{ matrix.os }}
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
os: [windows-latest, macos-latest]
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions/setup-node@v2
35+
with:
36+
node-version: 16.x
37+
cache: 'npm'
38+
- run: npm i -g npm
39+
- run: node -v
40+
- run: npm -v
41+
- run: npm ci
42+
- run: npm test

test/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ const _awsRestore = () => {
133133
describe('lib/main', function () {
134134
if (['win32', 'darwin'].includes(process.platform)) {
135135
// It seems that it takes time for file operation in Windows and Mac.
136-
// So set `timeout(60000)` for the whole test.
137-
this.timeout(60000)
136+
// So set `timeout(120000)` for the whole test.
137+
this.timeout(120000)
138138
}
139139

140140
let aws = null // mock

0 commit comments

Comments
 (0)