Move to Pnpm and Add a basic github actions CI #1
This file contains hidden or 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 | |
| - 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 | |
| legacy-node-test: | |
| name: "Legacy Node Test" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: | |
| - 0.10 | |
| - 0.12 | |
| - 4 | |
| - 5 | |
| - 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 |