39 lines
729 B
YAML
39 lines
729 B
YAML
permissions:
|
|
contents: read
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [20, 24, 25]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
# test on default version of npm
|
|
# - 9.6~10.8 on node@20
|
|
# - 11.3~11.6 on node@24
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: npx eslint . && npx prettier --check **/*.ts
|
|
|
|
- name: Build
|
|
run: npm run build
|