dev: updates devDependencies, migrates to eslint.config.js, fixes sec… #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ['**'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
pre-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
- run: npm install | |
- run: npm run format:check | |
- run: npm run lint:check | |
branch-test: | |
if: github.ref_name != 'main' && success() | |
needs: pre-test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'windows-latest'] | |
node: ['14.18.0'] | |
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: 'npm' | |
- run: npm install | |
- run: npm test | |
test: | |
if: github.ref_name == 'main' && success() | |
needs: pre-test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'windows-latest'] | |
node: ['14.18.0', '16.0', '18.0', '20.0'] | |
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- run: npm install | |
- run: npm test | |
- if: matrix.os == 'ubuntu-latest' && matrix.node == '20.0' | |
run: npm run coverage | |
- if: matrix.os == 'ubuntu-latest' && matrix.node == '20.0' | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: coverage.info | |
format: lcov |