Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
ci: Use node/npm version from package.json for lint
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Feb 13, 2023
1 parent c3f7af2 commit b8d253f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ jobs:
node:
runs-on: ubuntu-latest

strategy:
matrix:
node-versions: [16.x]

name: node${{ matrix.node-versions }}
name: node
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-versions }}
uses: actions/setup-node@v1
- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected]
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
with:
node-versions: ${{ matrix.node-versions }}
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies
run: npm ci
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"vue": "^2.7.14"
},
"engines": {
"node": "^16.0.0"
"node": "^16.0.0",
"npm": "^8.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.12",
Expand Down

0 comments on commit b8d253f

Please sign in to comment.