mirror of
https://github.com/acamarata/eslint-config.git
synced 2026-06-30 18:54:26 +00:00
110 lines
2.5 KiB
YAML
110 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [20, 22, 24]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Enable corepack
|
|
run: corepack enable
|
|
|
|
- name: Setup Node ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'pnpm'
|
|
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Test
|
|
run: node --test test/test.mjs
|
|
|
|
typecheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Enable corepack
|
|
run: corepack enable
|
|
|
|
- name: Setup Node 24
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Typecheck
|
|
run: pnpm run typecheck
|
|
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Enable corepack
|
|
run: corepack enable
|
|
|
|
- name: Setup Node 24
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Coverage
|
|
run: node --test --experimental-test-coverage test/test.mjs
|
|
|
|
pack-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Enable corepack
|
|
run: corepack enable
|
|
|
|
- name: Setup Node 24
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Pack
|
|
run: npm pack
|
|
|
|
- name: Verify pack contents
|
|
run: |
|
|
tar -tf *.tgz | sort
|
|
tar -tf *.tgz | grep -q "package/dist/index.cjs" || (echo "MISSING: dist/index.cjs" && exit 1)
|
|
tar -tf *.tgz | grep -q "package/dist/index.mjs" || (echo "MISSING: dist/index.mjs" && exit 1)
|
|
tar -tf *.tgz | grep -q "package/dist/index.d.ts" || (echo "MISSING: dist/index.d.ts" && exit 1)
|
|
tar -tf *.tgz | grep -q "package/README.md" || (echo "MISSING: README.md" && exit 1)
|
|
tar -tf *.tgz | grep -q "package/LICENSE" || (echo "MISSING: LICENSE" && exit 1)
|
|
echo "Pack check passed"
|