Skip to content

Tests

Tests #386

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
schedule:
# Every sunday at midnight
- cron: "0 0 * * 0"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run format
- run: node tools/toc.js check
- run: npx markdown-link-check -p README.md
integration:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [ubuntu-latest]
eslint: ["4.7", latest, next]
include:
# Windows support
- os: windows-latest
eslint: latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
- run: npm ci
- run: bash tools/integration-tests.bash ${{ matrix.eslint }}
test:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [ubuntu-latest]
node: [16, 18, 20]
eslint: [latest]
include:
# ESLint 4.7 support: lowest version supported
- os: ubuntu-latest
node: 20
eslint: "4.7"
# ESLint 5 support: lowest version we can use to test external html plugins support
- os: ubuntu-latest
node: 20
eslint: "5.0"
# Upcoming ESLint major version support
- os: ubuntu-latest
node: 20
eslint: next
# Windows support
- os: windows-latest
node: 20
eslint: latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm install eslint@${{ matrix.eslint }}
- run: npm test