Skip to content

More monorepo updates (#1207) #1930

More monorepo updates (#1207)

More monorepo updates (#1207) #1930

Workflow file for this run

# 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:
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
node: 14
# node 14/npm 8 on ubuntu and windows
- os: ubuntu-latest
npm: 8
node: 14
- os: windows-latest
npm: 8
node: 14
# node 20/npm 11 on ubuntu and windows (can't use 22 for reasons described in release.yml)
- os: ubuntu-latest
npm: 11
node: 20
- os: windows-latest
npm: 11
node: 20
name: build (${{ matrix.os }}, node ${{ matrix.node }}, npm ${{ matrix.npm }})
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install Node.js ${{ matrix.node }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
cache: yarn
node-version: ${{ matrix.node }}
# 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 --verbose
- run: yarn checkchange --verbose
- run: yarn format:check
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 && matrix.npm == 8
- run: yarn lint:ci
- run: yarn test --verbose
# The docs have a separate installation using Node 22 due to needing newer dependencies
docs:
name: build docs
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
cache: yarn
node-version-file: ./docs/.nvmrc
- run: yarn --immutable
working-directory: ./docs
- run: yarn docs:build
working-directory: ./docs