Skip to content

Commit

Permalink
Separate tests run on legacy Node.js versions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phillipj committed Oct 25, 2019
1 parent 6be1118 commit e3cea46
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Verify changes
on: [push, pull_request]

jobs:
build:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [0.10.x, 0.12.x, 4.x, 6.x, 8.x, 10.x, 12.x]
node-version: [6.x, 8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v1
Expand All @@ -20,3 +20,21 @@ jobs:
run: |
npm install
npm test
tests-on-legacy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [0.10.x, 0.12.x, 4.x]

steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm install mocha@3 chai@3
npm run test-unit
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: node_js
node_js:
- '0.10'
- 0.12
- 4
- 6
- 8
- 10
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"npm": ">=1.4.0"
},
"scripts": {
"pretest": "eslint mustache.js bin/mustache test/**/*.js",
"test": "mocha --reporter spec test/*-test.js",
"test": "npm run test-lint && npm run test-unit",
"test-lint": "eslint mustache.js bin/mustache test/**/*.js",
"test-unit": "mocha --reporter spec test/*-test.js",
"test-render": "mocha --reporter spec test/render-test",
"pre-test-browser": "node test/create-browser-suite.js",
"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",
Expand Down

0 comments on commit e3cea46

Please sign in to comment.