This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
Version Packages #5235
Workflow file for this run
This file contains 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
name: Node-CI | |
on: | |
pull_request: ~ | |
push: | |
branches: [main, changeset-release/*] | |
jobs: | |
node-tests: | |
runs-on: ubuntu-latest | |
name: 'Test (Node ${{ matrix.node-version }}, React ${{ matrix.react-version }})' | |
strategy: | |
fail-fast: false | |
matrix: | |
# The action will first check the local cache for a semver match. | |
# If unable to find a specific version in the cache, | |
# the action will attempt to download a version of Node.js. | |
# It will pull LTS versions from node-versions releases and on miss | |
# or failure will fall back to the previous behavior of downloading | |
# directly from node dist. | |
# https://github.com/actions/setup-node | |
node-version: ['18', '20'] | |
react-version: ['18'] | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- uses: actions/setup-node@v4 | |
name: Use Node.js ${{ matrix.node-version }} | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
check-latest: true | |
- uses: actions/cache@v4 | |
name: Restore cache | |
with: | |
path: | | |
.cache | |
packages/*/build/ts | |
packages/*/build/*.tsbuildinfo | |
key: ${{ runner.os }}-node${{ matrix.node-version }}-cache-v2-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-node${{ matrix.node-version }}-cache-v2- | |
- name: 📦 Install dependencies | |
run: | | |
npm install -g node-gyp | |
yarn --frozen-lockfile | |
- name: 🔨 Build | |
run: yarn build | |
- name: 💅🏼 Lint | |
run: | | |
yarn lint | |
yarn ci:lint-docs | |
- name: Unit tests | |
run: yarn test "^(?:(?!(address|react-server|web-worker)).)*$" | |
env: | |
REACT_VERSION: ${{ matrix.react-version }} | |
- name: E2E tests | |
run: yarn test --runInBand --forceExit "(address|react-server|web-worker)" | |
env: | |
REACT_VERSION: ${{ matrix.react-version }} |