Skip to content

Commit

Permalink
ci: move check-node-version to separate step
Browse files Browse the repository at this point in the history
The installed version of NPM shouldn't impact tests. It only matters when installing deps.
  • Loading branch information
onebytegone committed May 2, 2024
1 parent 3ce2b16 commit 18a9381
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
node-version-file: '.nvmrc'
- run: npm i -g [email protected]
- run: npm ci
- run: npm run check-node-version
- run: npm run standards
test:
needs: [ build ]
Expand All @@ -31,8 +32,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g [email protected]
- run: npm ci # Reinstall the dependencies to ensure they install with the current version of node
- run: npm ci # Reinstall the dependencies to ensure they install with the node's version of npm
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@v1
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"module": "./dist/esm/index",
"scripts": {
"prepare": "grunt build",
"test:node-version": "check-node-version --npm 10.5.0 --print",
"test": "npm run test:node-version && TS_NODE_PROJECT='tests/tsconfig.json' TS_NODE_FILES=true nyc mocha --opts ./.mocha.opts",
"check-node-version": "check-node-version --npm 10.5.0 --print",
"test": "TS_NODE_PROJECT='tests/tsconfig.json' TS_NODE_FILES=true nyc mocha --opts ./.mocha.opts",
"eslint": "eslint '{,!(node_modules|dist)/**/}*.{js,ts}'",
"markdownlint": "markdownlint -c .markdownlint.json -i CHANGELOG.md '{,!(node_modules)/**/}*.md'",
"commitlint": "commitlint --from 0b9d320",
Expand Down

0 comments on commit 18a9381

Please sign in to comment.