Skip to content

Commit f355674

Browse files
authored
Merge pull request #58 from micromatch/github_actions
Several improvements for GitHub Actions CI
2 parents 19803f1 + 46fa25a commit f355674

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ on:
66

77
jobs:
88
test:
9+
runs-on: ubuntu-latest
910
strategy:
11+
fail-fast: false
1012
matrix:
11-
node-version: [18.x, 20.x, 22.x]
12-
os: [ ubuntu-latest, macos-latest, windows-latest ]
13-
14-
runs-on: ${{ matrix.os }}
13+
node-version: [8.3.0, 8, 10, 12, 14, 16, 18, 20, 22]
1514

1615
steps:
1716
- uses: actions/checkout@v4

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"node": ">=8"
2626
},
2727
"scripts": {
28-
"test": "mocha",
28+
"test": "mocha -r ./test/mocha-initialization.js",
2929
"benchmark": "node benchmark"
3030
},
3131
"dependencies": {

test/braces.parse.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('braces.parse()', () => {
1616
it('should return an AST', () => {
1717
const ast = parse('a/{b,c}/d');
1818
const brace = ast.nodes.find(node => node.type === 'brace');
19-
assert(brace);
19+
assert.ok(brace);
2020
assert.equal(brace.nodes.length, 5);
2121
});
2222

@@ -30,7 +30,7 @@ describe('braces.parse()', () => {
3030
const ast = parse('a/{a,b,[{c,d}]}/e');
3131
const brace = ast.nodes[2];
3232
const bracket = brace.nodes.find(node => node.value[0] === '[');
33-
assert(bracket);
33+
assert.ok(bracket);
3434
assert.equal(bracket.value, '[{c,d}]');
3535
});
3636
});

test/mocha-initialization.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @fileoverview
3+
* This package works with node@8.3.0, which does not have support for `assert.strict`.
4+
* This module is a shim to support these methods.
5+
*
6+
* @todo Remove this file when we drop support for node@8.3.0.
7+
*/
8+
const assert = require('assert');
9+
10+
if (assert.strict === undefined) {
11+
assert.strict = {
12+
ok: assert.ok,
13+
equal: assert.equal,
14+
deepEqual: assert.deepEqual,
15+
throws: assert.throws,
16+
};
17+
}

0 commit comments

Comments
 (0)