Skip to content

chore: add lint and format (#10) #39

chore: add lint and format (#10)

chore: add lint and format (#10) #39

Workflow file for this run

name: CI
concurrency:
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test (Node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node: [18, 20, 22]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run test
run: pnpm run test
code-check:
name: Code check (${{ matrix.script }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
script: ["lint", "format"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run ${{ matrix.script }}
run: pnpm run ${{ matrix.script }}