Skip to content

Commit

Permalink
Split linting and testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh committed Sep 19, 2023
1 parent d388fe2 commit 9c728c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18.0'
- uses: actions/checkout@v4
- run: npm ci
- run: npm run lint

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -43,17 +53,17 @@ jobs:
- '18.x'
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm install
- if: ${{ matrix.node-version == '4.x' }}
run: npm install mocha@5.0.0 eslint@4.19.1 esquery@1.0.0 nyc@11.8.0
run: npm install mocha@5.0.0 nyc@11.8.0
- run: npm test
- run: node_modules/.bin/nyc --reporter=text-lcov node_modules/.bin/mocha | tee lcov.info
- uses: coverallsapp/github-action@master
if: ${{ matrix.node-version == '16.0' }}
if: ${{ matrix.node-version == '18.0' }}
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
"node": ">=4.0"
},
"scripts": {
"test": "npm run lint && npm run mocha",
"lint": "eslint *.js test",
"mocha": "nyc mocha"
"test": "nyc mocha"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 9c728c3

Please sign in to comment.