diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b691cd1e..cb148aac 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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/read-package-engines-version-actions@v1.2 + 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 diff --git a/package.json b/package.json index 81790738..905e8d7a 100644 --- a/package.json +++ b/package.json @@ -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",