ci: add ci #2
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: Unit tests | |
on: | |
pull_request: | |
push: | |
branches: ['**'] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
name: Test (${{ matrix.os }} / node ${{ matrix.node }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# we want to know if a test fails on a specific node version | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [18, 20] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Test | |
id: test | |
run: | | |
node -v | |
pnpm test |