Skip to content

Prepare 16.0.0

Prepare 16.0.0 #6020

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
merge_group:
env:
FORCE_COLOR: 2
jobs:
lint:
uses: stylelint/.github/.github/workflows/lint.yml@main
test:
uses: stylelint/.github/.github/workflows/test.yml@main
with:
node-version: '["16", "18", "20"]'
os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
exclude: '[{"node-version": "18", "os": "ubuntu-latest"}]' # for coverage
# HACK: `--workerIdleMemoryLimit` can avoid failures on Node.js 20. See https://github.com/jestjs/jest/issues/11956
test-options: '--workerIdleMemoryLimit=0.2'
test-coverage:
name: Test on Node.js 18 and ubuntu-latest with coverage
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install latest npm
run: npm install --global npm
- name: Install dependencies
run: npm ci
- name: Test with coverage
run: npm run test-coverage
env:
# https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
NODE_OPTIONS: '--max-old-space-size=4096'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./.coverage/lcov.info
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: npm
- name: Install latest npm
run: npm install --global npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Check built files
run: npm run build-check
spellcheck:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install codespell
run: pip install codespell
- name: Spellcheck
# Ignore a CI failure because there are false positives.
run: codespell || echo 'Fix misspells via "codespell" on your console, or ignore false positives.'