Skip to content

remove viz from main branch #12232

remove viz from main branch

remove viz from main branch #12232

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
env:
FORCE_COLOR: '1'
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- name: Checkout (PR)
if: github.event_name == 'pull_request'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# fetch-depth: 0 looks like it has a perf impact, so let's not do that if we don't have to.
# see https://github.com/actions/checkout/blob/main/README.md#usage
- name: Checkout (Push)
if: github.event_name != 'pull_request'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0 # needed for dirty check
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Upgrade npm # for workspace support
run: npm i -g npm@9 # npm@9 supports our supported Node.js versions
- name: Install Dependencies
uses: bahmutov/npm-install@237ded403e6012a48281f4572eab0c8eafe55b3f # v1.10.1
with:
useRollingCache: true
install-command: npm ci --foreground-scripts
- name: Test
run: npm test
- name: Dirty Check
run: node ./scripts/dirty-check.js
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
uses: bahmutov/npm-install@237ded403e6012a48281f4572eab0c8eafe55b3f # v1.10.1
with:
useRollingCache: true
install-command: npm ci --foreground-scripts
- name: Lint Sources
run: npm run lint:eslint
- name: Lint Dependencies
run: npm run lint:deps
- name: Validate Lockfile
run: npm ls
compatibility-test-windows:
name: Test Windows compatibility
runs-on: windows-latest
strategy:
fail-fast: false
env:
FORCE_COLOR: 1
TEST_WORKSPACES: >-
--workspace=packages/aa
--workspace=packages/allow-scripts
--workspace=packages/core
--workspace=packages/lavapack
--workspace=packages/preinstall-always-fail
--workspace=packages/tofu
--workspace=packages/yarn-plugin-allow-scripts
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install Dependencies
uses: bahmutov/npm-install@237ded403e6012a48281f4572eab0c8eafe55b3f # v1.10.1
with:
useRollingCache: true
install-command: npm ci --foreground-scripts
# Limit testing to packages supported to run under windows
- name: Test
run: |
npm run --if-present ${{ env.TEST_WORKSPACES }} build
npm run build:types
npm run --if-present ${{ env.TEST_WORKSPACES }} test:prep
npm run --if-present ${{ env.TEST_WORKSPACES }} test
compatibility-test-macos:
name: Test macOS compatibility
runs-on: macOS-latest
env:
FORCE_COLOR: 1
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install Dependencies
uses: bahmutov/npm-install@237ded403e6012a48281f4572eab0c8eafe55b3f # v1.10.1
with:
useRollingCache: true
install-command: npm ci --foreground-scripts
- name: Test
run: npm test