Skip to content

Commit 95aa090

Browse files
committed
Separate tests run on legacy Node.js versions
Primarily because it's getting to be a pain in the backside to always consider pre Node.js 6 when wanting to use up-to-date dependencies.
1 parent 04cf3c2 commit 95aa090

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.github/workflows/verify.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Verify changes
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
tests:
77
runs-on: ubuntu-latest
88

99
strategy:
1010
matrix:
11-
node-version: [0.10.x, 0.12.x, 4.x, 6.x, 8.x, 10.x, 12.x]
11+
node-version: [8.x, 10.x, 12.x]
1212

1313
steps:
1414
- uses: actions/checkout@v1
@@ -20,3 +20,21 @@ jobs:
2020
run: |
2121
npm install
2222
npm test
23+
24+
tests-on-legacy:
25+
runs-on: ubuntu-latest
26+
27+
strategy:
28+
matrix:
29+
node-version: [0.10.x, 0.12.x, 4.x, 6.x]
30+
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v1
35+
with:
36+
node-version: ${{ matrix.node-version }}
37+
- name: npm install and test
38+
run: |
39+
npm install mocha@3 chai@3
40+
npm run test-unit

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
language: node_js
22
node_js:
3-
- '0.10'
4-
- 0.12
5-
- 4
63
- 6
74
- 8
85
- 10

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
"npm": ">=1.4.0"
3333
},
3434
"scripts": {
35-
"pretest": "eslint mustache.js bin/mustache test/**/*.js",
36-
"test": "mocha --reporter spec test/*-test.js",
35+
"test": "npm run test-lint && npm run test-unit",
36+
"test-lint": "eslint mustache.js bin/mustache test/**/*.js",
37+
"test-unit": "mocha --reporter spec test/*-test.js",
3738
"test-render": "mocha --reporter spec test/render-test",
3839
"pre-test-browser": "node test/create-browser-suite.js",
3940
"test-browser": "npm run pre-test-browser && zuul -- test/context-test.js test/parse-test.js test/scanner-test.js test/render-test-browser.js",

0 commit comments

Comments
 (0)