Fix eslint not executed #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI pipeline | |
on: | |
pull_request: | |
branches: | |
- "**" # Runs on all pull requests | |
jobs: | |
check-test-coverage: | |
# The coverage is configured inside 'jest.config.js' by setting the 'coverageThreshold' | |
name: Checking test coverage (must be over 90%) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 20.17 ] # Define Node.js latest LTS version (update as needed) | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Fail the job if there are uncovered files (js, ts, jsx, tsx) | |
- name: Make script 'check-missing-tests.sh' executable | |
run: chmod +x ./check-missing-tests.sh | |
- name: Check missing tests | |
run: ./check-missing-tests.sh | |
# Step 3: Set up Node.js with the required version | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# Step 4: Install dependencies | |
- name: Install dependencies | |
run: npm install | |
# Step 5: Run Jest tests | |
- name: Run Jest tests | |
run: npm run test:coverage | |
env: | |
CI: true # Ensures Jest runs in CI mode | |
# Step 6: Upload test coverage results (optional, if you want to store it in the workflow run artifacts) | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: coverage/lcov-report/ # Path to the HTML coverage report | |
retention-days: 7 |