Update Yarn to v4.9.2 #1494
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: PR | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
concurrency: | |
# For PRs, use the ref (branch) in the concurrency group so that new pushes cancel any old runs. | |
# For pushes to main, ideally we wouldn't set a concurrency group, but github actions doesn't | |
# support conditional blocks of settings, so we use the SHA so the "group" is unique. | |
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }} | |
cancel-in-progress: true | |
permissions: {} | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
npm: [8] | |
include: | |
- os: ubuntu-latest | |
# npm 6 and 8 have slightly different behavior with verdaccio in publishing tests. | |
# It's unclear if this translates to meaningful differences in behavior in actual scenarios, | |
# but test against both versions to be safe. (Only do this on the ubuntu build for speed.) | |
npm: 6 | |
name: build (${{ matrix.os }}, npm ${{ matrix.npm }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Node.js from .nvmrc | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
with: | |
cache: yarn | |
node-version-file: .nvmrc | |
# Guarantee a predictable version of npm for the first round of tests | |
- name: Install npm@${{ matrix.npm }} | |
run: npm install --global npm@${{ matrix.npm }} | |
- run: yarn --frozen-lockfile | |
- run: yarn build | |
- run: yarn checkchange --verbose | |
- run: yarn test:unit | |
- run: yarn test:func | |
- run: yarn test:e2e | |
# The docs have a separate installation using Node 20 due to needing newer dependencies | |
docs: | |
name: build docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Node.js 20 | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
with: | |
cache: yarn | |
node-version: 20 | |
- run: yarn --immutable | |
working-directory: ./docs | |
- run: yarn docs:build | |
working-directory: ./docs |