Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/actions/setup-pnpm-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Setup pnpm and Node dependencies
description: Setup pnpm, setup Node.js with pnpm cache, and install dependencies.
inputs:
node-version:
description: Node.js version to install.
required: true
runs:
using: composite
steps:
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # tag=v4.1.0

- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0
with:
node-version: ${{ inputs.node-version }}
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
27 changes: 27 additions & 0 deletions .github/workflows/test-main-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test Main Matrix

on:
push:
branches: [main]
paths-ignore:
- 'website/**'
workflow_dispatch:

jobs:
test_main_matrix:
name: Tests [Node ${{ matrix.node_version }}]
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18', '20', '22', '24']
os: [ubuntu-latest]

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
- name: Setup workspace
uses: ./.github/actions/setup-pnpm-node
with:
node-version: ${{ matrix.node_version }}

- name: Run tests
run: pnpm test
47 changes: 30 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: CI Checks

on:
push:
Expand All @@ -11,32 +11,45 @@ on:
workflow_dispatch:

jobs:
verify:
name: Verify [Node ${{ matrix.node_version }}]
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18', '20', '22', '24']
os: [ubuntu-latest]
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # tag=v4.1.0

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0
- name: Setup workspace
uses: ./.github/actions/setup-pnpm-node
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile
node-version: '24'

- name: Lint
run: pnpm lint:ci

typecheck:
name: TypeScript
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
- name: Setup workspace
uses: ./.github/actions/setup-pnpm-node
with:
node-version: '24'

- name: Type check
run: pnpm typecheck

test_pr:
name: Tests
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
- name: Setup workspace
uses: ./.github/actions/setup-pnpm-node
with:
node-version: '24'

- name: Run tests
run: pnpm test