diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 60f0b82..271a1b3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,6 +1,3 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - name: Build Status on: @@ -9,27 +6,26 @@ on: pull_request: branches: [ main ] +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: build: - - runs-on: ${{ matrix.os }} - strategy: matrix: os: [macos-latest, windows-latest, ubuntu-latest] node-version: [8.3.0, 18.x] - + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} + - uses: actions/checkout@v4.1.7 + - uses: volta-cli/action@v4.1.1 + - run: volta pin node@${{ matrix.node-version }} # Node 8.3.0 comes with npm 5.3.0. # npm 5.7.1 is the first version to support npm ci - if: ${{ matrix.node-version != '18.x' }} - run: npm install -g npm@5.7.1 + run: volta pin npm@5.7.1 - run: npm install - run: npm run e2e @@ -41,4 +37,3 @@ jobs: # ESLint 7+ uses `} catch {` which isn't supported in Node 8 - if: ${{ matrix.node-version == '18.x' }} run: npm run lint -