fix: add type tests #452
Workflow file for this run
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: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install Packages | |
run: npm install | |
env: | |
CI: true | |
- name: Lint | |
run: npm run lint | |
format: | |
name: File Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install Packages | |
run: npm install | |
env: | |
CI: true | |
- name: Prettier Check | |
run: npm run fmt:check | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
eslint: [9] | |
node: [23.x, 22.x, 21.x, 20.x, 18.x, "18.18.0"] | |
include: | |
- os: windows-latest | |
eslint: 9 | |
node: 20 | |
- os: macOS-latest | |
eslint: 9 | |
node: 20 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install Packages | |
run: npm install | |
env: | |
CI: true | |
- name: Install ESLint@${{ matrix.eslint }} | |
run: npm install eslint@${{ matrix.eslint }} | |
- name: Test | |
run: npm run test | |
test_types: | |
name: Test Types | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Check Types | |
run: npm run test:types | |
jsr_test: | |
name: Verify JSR Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Install Packages | |
run: npm install | |
- name: Run --dry-run | |
run: | | |
npm run build | |
npm run test:jsr |