Skip to content

Commit

Permalink
chore: fixed script
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarRajput-7 committed Apr 15, 2024
1 parent 4b690fe commit b4b8f52
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/jest-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ jobs:
- name: Install dependencies
run: cd frontend && yarn install

- name: Run Jest with Coverage
run: |
cd frontend && npm test --silent --coverageReporters text --coverageReporters json-summary --changedSince=origin/develop --passWithNoTests --maxWorkers=5 --ci --testResultsProcessor="jest-junit"
# - name: Run Jest with Coverage
# run: |
# cd frontend && npm test --silent --coverageReporters text --coverageReporters json-summary --changedSince=origin/develop --passWithNoTests --maxWorkers=5 --ci --testResultsProcessor="jest-junit"

# yarn custom-coverage --verbose

- name: Get Changed Files
id: get_changed_files
run: echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.jsx\?$' || true)"

yarn custom-coverage --verbose
- name: Run Jest with Coverage for Changed Files
run: npm test -- --coverage --findRelatedTests ${{ steps.get_changed_files.outputs.files }}

- name: Upload Coverage Results
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit b4b8f52

Please sign in to comment.