name: Test
# Disabled - manual for now
# on:
# push:
# branches: [main, master]
# pull_request:
# branches: [main, master]
on: workflow_dispatch
jobs:
test:
name: Test on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20, 22]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm clean-install
- name: Build package
run: npm run build
- name: Type check
run: npm run type-check
- name: Lint
run: npm run lint
- name: Format check
run: npm run format:check
- name: Test package
run: npm test
- name: Test npx execution
run: npx . --help