diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 4d7d333a1..952735830 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -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 @@ -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 diff --git a/.travis.yml b/.travis.yml index d8f2eb69f..19a71e8d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: node_js node_js: - - '0.10' - - 0.12 - - 4 - 6 - 8 - 10 diff --git a/package.json b/package.json index c78eabd62..bc8eeb8b5 100644 --- a/package.json +++ b/package.json @@ -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",