prettier-config/.github/workflows/ci.yml
2026-05-28 13:45:11 -04:00

57 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: pnpm install
- name: Test
run: pnpm test
pack-check:
name: Pack Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node 24
uses: actions/setup-node@v4
with:
node-version: 24
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: pnpm install
- name: Verify pack contents
run: |
npm pack --dry-run 2>&1 | tee pack-output.txt
grep "index.js" pack-output.txt
grep "README.md" pack-output.txt
grep "CHANGELOG.md" pack-output.txt
grep "LICENSE" pack-output.txt
echo "Pack check passed"