Skip to content

deps: update eslint and fix associated tests #364

deps: update eslint and fix associated tests

deps: update eslint and fix associated tests #364

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@v3
- uses: actions/setup-node@v3
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@v3
- uses: actions/setup-node@v3
with:
cache: npm
# https://github.com/actions/setup-node/issues/515#issuecomment-1153685437
- if: ${{ matrix.os == 'windows-latest' }}
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
cd $NodeDirPath
npm install npm@8.12.1
- run: npm ci
- run: bash tools/integration-tests.bash ${{ matrix.eslint }}
test:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [ubuntu-latest]
node: [12, 14, 16, 18]
eslint: [latest]
include:
# ESLint 4.7 support: lowest version supported
- os: ubuntu-latest
node: 18
eslint: "4.7"
# ESLint 5 support: lowest version we can use to test external html plugins support
- os: ubuntu-latest
node: 18
eslint: "5.0"
# Upcoming ESLint major version support
- os: ubuntu-latest
node: 18
eslint: next
# Windows support
- os: windows-latest
node: 18
eslint: latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm install eslint@${{ matrix.eslint }}
- run: npm test