chore: update deps and CI #70
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 | |
# Declare default permissions as read only. | |
permissions: read-all | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
inspect-code: | |
name: Inspect code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3.4.1 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint code | |
run: npm run lint | |
- name: Lint commits | |
run: npm run commitlint | |
if: github.event_name != 'pull_request' | |
tests: | |
name: ${{ matrix.os.name }} tests (${{ matrix.node }}) | |
runs-on: ${{ matrix.os.machine }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
os: | |
- name: Linux | |
machine: ubuntu-latest | |
- name: macOS | |
machine: macos-latest | |
- name: Windows | |
machine: windows-latest | |
node: | |
- lts | |
- latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3.4.1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: npm test |