Skip to content

Stop running tests on Node 18 in CI #150

Stop running tests on Node 18 in CI

Stop running tests on Node 18 in CI #150

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v5
with:
node-version-file: .tool-versions
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run build
run: pnpm build
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v5
with:
node-version-file: .tool-versions
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run pnpm lint:eslint
if: ${{ success() || failure() }}
run: pnpm lint:eslint
- name: Run pnpm lint:markdownlint
if: ${{ success() || failure() }}
run: pnpm lint:markdownlint
- name: Run pnpm lint:pnpm-dedupe
if: ${{ success() || failure() }}
run: pnpm lint:pnpm-dedupe
- name: Run pnpm lint:prettier
if: ${{ success() || failure() }}
run: pnpm lint:prettier
- name: Run pnpm lint:tsc
if: ${{ success() || failure() }}
run: pnpm lint:tsc
tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-26, windows-2025, ubuntu-24.04]
node: [20, 22, 24]
exclude:
- os: ubuntu-22.04
node: 24
include:
- os: ubuntu-22.04
node: 24
extra: coverage
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: "Prettier v1: Run tests"
if: ${{ success() || failure() }}
run: pnpm test
env:
COVERAGE: ${{ matrix.extra == 'coverage' }}
PRETTIER_MAJOR_VERSION: "1"
- name: "Prettier v1: Report coverage to codecov.io"
uses: codecov/codecov-action@v5
if: matrix.extra == 'coverage'
with:
name: prettier-v1
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Prettier v2: Run tests"
if: ${{ success() || failure() }}
run: pnpm test
env:
COVERAGE: ${{ matrix.extra == 'coverage' }}
PRETTIER_MAJOR_VERSION: "2"
- name: "Prettier v2: Report coverage to codecov.io"
uses: codecov/codecov-action@v3
if: matrix.extra == 'coverage'
with:
name: prettier-v2
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Prettier v3: Run tests"
if: ${{ success() || failure() }}
run: pnpm test
env:
COVERAGE: ${{ matrix.extra == 'coverage' }}
- name: "Prettier v3: Report coverage to codecov.io"
uses: codecov/codecov-action@v5
if: matrix.extra == 'coverage'
with:
name: prettier-v3
token: ${{ secrets.CODECOV_TOKEN }}