mirror of
https://github.com/glittercowboy/get-shit-done
synced 2026-04-25 17:25:23 +02:00
c8 v11 requires Node 20+ (engines: ^20.0.0 || >=22.0.0). Node 18 now runs plain npm test on PRs to avoid engine mismatch. Also removes redundant --exclude flag from test:coverage script. Also: fix ROADMAP.md progress table alignment (rows 7-12), mark Phase 7 complete, add requirements-completed to 09-01-SUMMARY.md.
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
node-version: [18, 20, 22]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run tests
|
|
if: github.event_name != 'pull_request'
|
|
run: npm test
|
|
|
|
- name: Run tests with coverage
|
|
# c8 v11 requires Node 20+ (engines: ^20.0.0 || >=22.0.0). Node 18 EOL April 2025.
|
|
if: github.event_name == 'pull_request' && matrix.node-version != 18
|
|
run: npm run test:coverage
|
|
|
|
- name: Run tests (Node 18, coverage not supported)
|
|
if: github.event_name == 'pull_request' && matrix.node-version == 18
|
|
run: npm test
|