diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 791b29d81..d75a1a459 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -18,20 +18,11 @@ jobs: - sudo apt install -y jq && yarn run jsonlint steps: - uses: actions/checkout@v2 - - name: Use Node.js 14 + - name: Use Node.js 16 uses: actions/setup-node@v2 with: - node-version: 14 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: 16 + cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: ${{matrix.command}} dynamic-tests: @@ -39,23 +30,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 15.x, 16.x] + node-version: [12, 14, 16] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: yarn run mocha-suite production-build: @@ -63,27 +45,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 15.x, 16.x] + node-version: [12, 14, 16] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + cache: yarn - run: yarn --frozen-lockfile --prefer-offline - run: yarn run build - uses: actions/upload-artifact@v2 - if: github.ref == 'refs/heads/master' && matrix.node-version == '14.x' + if: github.ref == 'refs/heads/master' && matrix.node-version == '16' with: name: Prebuild with Node.js ${{ matrix.node-version }} path: |