Skip to content

chore(deps-dev): bump lint-staged from 15.2.10 to 15.4.3 #70

chore(deps-dev): bump lint-staged from 15.2.10 to 15.4.3

chore(deps-dev): bump lint-staged from 15.2.10 to 15.4.3 #70

Workflow file for this run

name: PR Checks
on:
pull_request:
branches:
- main # Run checks on PRs to the main branch
permissions:
contents: write
jobs:
pr-checks:
name: Run PR Checks
runs-on: ubuntu-latest # Ubuntu environment
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for accurate builds
# Step 2: Set up Node.js (use version 20)
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm" # Cache node_modules to improve speed
# Step 3: Install dependencies using npm ci
- name: Install dependencies
run: npm ci
# Step 4: Run TypeScript Type-Checking
- name: Run TypeScript Type-Checking
run: npx tsc --noEmit
continue-on-error: false # Fail the PR if type-checking fails
# Step 5: Build the project
- name: Build the project
run: npm run build
# Step 6: Run linting
- name: Run Linting
run: npm run lint
# Step 7: Run Unit Tests with Coverage
- name: Run Tests with Coverage
run: npm run test
env:
CI: true # Ensure tests run in CI mode
# Step 8: Enforce Code Coverage Threshold
- name: Check Code Coverage Threshold
run: |
npm run test --coverageThreshold='{
"global": {
"statements": 100,
"lines": 100,
"branches": 50,
"functions": 50
}
}'
continue-on-error: false # Fail if coverage doesn't meet the threshold