Skip to content

feat(types): enhance type definitions with explicit null handling #2

feat(types): enhance type definitions with explicit null handling

feat(types): enhance type definitions with explicit null handling #2

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
attestations: write
id-token: write
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup 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 security audit
run: npm audit --audit-level=high
- name: Run lint
run: npm run lint
- name: Run type check
run: npm run typecheck
- name: Run tests
run: npm run test:run
- name: Build
run: npm run build
- name: Upload coverage reports
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
# Generate SBOM and build attestation only for Node.js 20.x
- name: Generate SBOM
if: matrix.node-version == '20.x'
uses: anchore/sbom-action@v0
with:
path: .
format: spdx-json
- name: Submit dependency snapshot
if: matrix.node-version == '20.x'
uses: actions/dependency-review-action@v4
- name: Create npm package
if: matrix.node-version == '20.x'
run: npm pack
- name: Attest build provenance
if: matrix.node-version == '20.x'
uses: actions/attest-build-provenance@v1
with:
subject-path: |
dist/**/*
*.tgz
- name: Upload build artifacts
if: matrix.node-version == '20.x'
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
dist/
*.tgz
*.sbom.spdx.json