Skip to content

Move to Pnpm and Add a basic github actions CI #3

Move to Pnpm and Add a basic github actions CI

Move to Pnpm and Add a basic github actions CI #3

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request: {}
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20
- 22
- 24
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install
- run: pnpm test
super-legacy-node-test:
name: "Super Legacy Node Test"
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node-version:
- "0.10"
- "0.12"
- 4
steps:
- uses: actions/checkout@v6
# use the built-in npm for these super old tests
- run: cat package.json | jq "del(.packageManager)" | tee package.json
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm install
- run: npm test
legacy-node-test:
name: "Legacy Node Test"
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node-version:
- 6
- 8
- 10
- 12
- 14
- 16
steps:
- uses: actions/checkout@v6
# prevent yarn from complaining about the packageManager key in the package.json
- run: cat package.json | jq ".packageManager = \"yarn@1.22.22\"" | tee package.json
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn test
windows-test:
name: "Windows smoke test"
runs-on: windows-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- run: pnpm install
- run: pnpm test