Lint packages with publint #176
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'packages/**' | |
- '.github/workflows/ci.yml' | |
- 'pnpm-lock.yaml' | |
- '!**.md' | |
pull_request: | |
paths: | |
- 'packages/**' | |
- '.github/workflows/ci.yml' | |
- 'pnpm-lock.yaml' | |
- '!**.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18, 20, 22] | |
include: | |
- os: windows-latest | |
node: 22 | |
fail-fast: false | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: pnpm install | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Lint | |
run: pnpm lint | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Typecheck | |
run: pnpm typecheck | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Lint with publint | |
run: pnpm lint-publint | |
- name: Run tests | |
run: pnpm test |