chore: added jest coverage setup #7
Workflow file for this run
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: Jest Coverage Check | |
on: | |
pull_request: | |
branches: | |
- develop | |
- main | |
- release/v* | |
jobs: | |
jest_coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: cd frontend && yarn install | |
- name: Run Jest with Coverage | |
run: cd frontend && npm test --coverage | |
- name: Upload Coverage Results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage | |
path: coverage # Adjust this path according to your coverage report location | |
- name: Display Coverage Summary | |
run: | | |
echo "Coverage Summary:" | |
cat coverage/lcov-report/index.html | grep -oP '(?<=<span class="strong">).*(?=%</span>)' | tail -n 1 |