mirror of
https://github.com/acamarata/prettier-config.git
synced 2026-07-01 03:14:29 +00:00
59 lines
1.3 KiB
YAML
59 lines
1.3 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 }}
|
|
cache: 'pnpm'
|
|
|
|
- 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
|
|
cache: 'pnpm'
|
|
|
|
- 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"
|