Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 30 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,41 @@ permissions:
jobs:
quality:
name: Quality Checks
uses: ./.github/workflows/quality-checks.yml
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Format check
run: npm run format:check || true

- name: Type check
run: npm run build

test:
name: Test Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20, 22]
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -39,56 +60,27 @@ jobs:

- name: Upload coverage
if: matrix.node-version == '20'
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v4
with:
files: ./coverage/coverage-final.json
fail_ci_if_error: false

# Lint and format checks are now handled by the quality-checks workflow

security:
name: Security Audit
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run npm audit (all dependencies)
run: npm audit --audit-level=moderate
continue-on-error: true

- name: Run npm audit (production only - strict)
run: npm audit --omit=dev --audit-level=high

- name: Check for outdated dependencies
run: npm outdated || true

- name: Verify integrity of package-lock.json
run: |
npm install --package-lock-only --ignore-scripts
# Allow version bumps in package-lock (normal for releases)
git diff --exit-code package-lock.json || echo "Package lock has changes (may be version bump)"
continue-on-error: true

- name: Check for known vulnerabilities in package-lock
run: |
if command -v npm-audit-resolver &> /dev/null; then
npm audit --json | npm-audit-resolver --no-interactive
else
echo "npm-audit-resolver not available, skipping"
fi
continue-on-error: true

- name: License compliance check
run: |
npx license-checker --summary --onlyAllow 'MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;CC0-1.0;Unlicense' || true
- name: Run npm audit
run: npm audit --audit-level=high
continue-on-error: true
Loading
Loading