Skip to content

Commit

Permalink
refactor: remove redundant steps
Browse files Browse the repository at this point in the history
  • Loading branch information
varshith257 authored Jan 14, 2025
1 parent 38fcd66 commit d5fadde
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,22 +245,23 @@ jobs:
uses: tj-actions/changed-files@v45

- name: Run Jest Tests
if: steps.changed-files.outputs.only_changed != 'true'
if: steps.changed-files.outputs.any_changed == 'true'
env:
NODE_V8_COVERAGE: './coverage/jest'
run: |
npm run test -- --watchAll=false --coverage
- name: Upload Jest Coverage to Codecov
if: steps.changed-files.outputs.only_changed != 'true'
uses: codecov/codecov-action@v3
if: steps.changed-files.outputs.any_changed == 'true'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/jest/lcov.info
flags: jest
fail_ci_if_error: true

- name: Run Vitest Tests
if: steps.changed-files.outputs.only_changed != 'true'
if: steps.changed-files.outputs.any_changed == 'true'
env:
NODE_V8_COVERAGE: './coverage/vitest'
run: |
Expand All @@ -283,16 +284,6 @@ jobs:
fi
done
- name: Present and Upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
gcov_ignore: 'docs/'
fail_ci_if_error: false
files: './coverage/lcov.info'
name: '${{env.CODECOV_UNIQUE_NAME}}'

- name: Test acceptable level of code coverage
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
Expand Down

0 comments on commit d5fadde

Please sign in to comment.