Feature: Updated PR checks #33
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: PR checks | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: 'lint ${{ matrix.os.id }} (node: ${{ matrix.node-version }})' | |
runs-on: ${{ matrix.os.id }} | |
strategy: | |
matrix: | |
os: | |
- { id: ubuntu-22.04, name: jammy } | |
# 18 is oldest LTS, 20 is the current, 22 is what will be the next | |
node-version: ['18', '20', '22'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run eslint | |
run: npm run lint | |
compile: | |
name: 'compile ${{ matrix.os.id }} (node: ${{ matrix.node-version }})' | |
runs-on: ${{ matrix.os.id }} | |
strategy: | |
matrix: | |
os: | |
- { id: ubuntu-22.04, name: jammy } | |
# 18 is oldest LTS, 20 is the current, 22 is what will be the next | |
node-version: ['18', '20', '22'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Compile project | |
run: npm run compile | |
test: | |
name: 'test ${{ matrix.os.id }} (node: ${{ matrix.node-version }})' | |
runs-on: ${{ matrix.os.id }} | |
strategy: | |
matrix: | |
os: | |
- { id: ubuntu-22.04, name: jammy } | |
# 18 is oldest LTS, 20 is the current, 22 is what will be the next | |
node-version: ['18', '20', '22'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Test project | |
run: npm test |