Skip to content

build(deps-dev): Bump prettier from 3.7.4 to 3.9.4 #117

build(deps-dev): Bump prettier from 3.7.4 to 3.9.4

build(deps-dev): Bump prettier from 3.7.4 to 3.9.4 #117

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
NODE_VERSION: '20'
# Enables caching of npm dependencies
# See: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
CACHE_VERSION: 'v1'
jobs:
# Dependency installation and caching
install:
name: Install Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache node_modules
uses: actions/cache/save@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
# Type checking
typecheck:
name: TypeScript Type Check
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache/restore@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
fail-on-cache-miss: true
- name: Run TypeScript compilation check
run: npm run build -- --noEmit
- name: Generate TypeScript diagnostics report
if: failure()
run: |
echo "TypeScript compilation failed. Run 'npm run build' locally for details."
# Linting
lint:
name: Lint Code
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache/restore@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
fail-on-cache-miss: true
- name: Run ESLint
run: npm run lint
continue-on-error: false
- name: Annotate lint errors
if: failure()
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
eslint_flags: '.'
# Testing
test:
name: Run Tests
runs-on: ubuntu-latest
needs: install
strategy:
matrix:
shard: [1, 2, 3, 4]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache/restore@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
fail-on-cache-miss: true
- name: Run tests with coverage
run: npm test -- --coverage --shard=${{ matrix.shard }}/4 --reporter=verbose
- name: Upload coverage reports
uses: actions/upload-artifact@v6
with:
name: coverage-shard-${{ matrix.shard }}
path: coverage/
retention-days: 7
- name: Upload test results
if: always()
uses: actions/upload-artifact@v6
with:
name: test-results-shard-${{ matrix.shard }}
path: |
test-results/
coverage/
retention-days: 7
# Coverage aggregation and reporting
coverage:
name: Coverage Report
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Download all coverage artifacts
uses: actions/download-artifact@v8
with:
pattern: coverage-shard-*
path: coverage/
merge-multiple: true
- name: Generate coverage summary
run: |
npx istanbul-combine -d coverage/combined -r lcov -r json-summary coverage/*/coverage-final.json || true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/combined/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
verbose: true
- name: Add coverage comment to PR
if: github.event_name == 'pull_request'
uses: romeovs/lcov-reporter-action@v0.4.0
with:
lcov-file: ./coverage/combined/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage artifact
uses: actions/upload-artifact@v6
with:
name: coverage-report
path: coverage/combined/
retention-days: 30
# Build all packages
build:
name: Build Packages
runs-on: ubuntu-latest
needs: [typecheck, lint, test]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache/restore@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
fail-on-cache-miss: true
- name: Build all packages
run: npm run build
- name: Verify build outputs
run: |
echo "Verifying build outputs..."
ls -la packages/*/dist
for pkg in packages/*/; do
if [ -d "${pkg}dist" ]; then
echo "✓ Build output exists for ${pkg}"
else
echo "✗ Missing build output for ${pkg}"
exit 1
fi
done
- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: dist
path: |
packages/*/dist
dist
retention-days: 7
- name: Cache build outputs
uses: actions/cache/save@v5
with:
path: |
packages/*/dist
dist
key: ${{ runner.os }}-build-${{ github.sha }}
# Property-based testing
property-tests:
name: Property-Based Tests
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache/restore@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
fail-on-cache-miss: true
- name: Run property-based tests
run: npm run test:property || true
# Security audit
security:
name: Security Audit
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Restore node_modules cache
uses: actions/cache/restore@v5
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ env.CACHE_VERSION }}
fail-on-cache-miss: true
- name: Run npm audit
run: npm audit --audit-level=moderate
continue-on-error: true
- name: Run npm audit (production only)
run: npm audit --production --audit-level=high
- name: Check for outdated dependencies
run: npm outdated || true
# CI Summary
ci-summary:
name: CI Summary
runs-on: ubuntu-latest
needs: [typecheck, lint, test, build, security]
if: always()
steps:
- name: Generate CI summary
run: |
echo "## CI Pipeline Summary 📊" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
echo "| TypeScript Check | ${{ needs.typecheck.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Linting | ${{ needs.lint.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Tests | ${{ needs.test.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Build | ${{ needs.build.result == 'success' && '✅ Passed' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Security Audit | ${{ needs.security.result == 'success' && '✅ Passed' || '⚠️ Review' }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Branch:** ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY