Skip to content

Commit

Permalink
Merge pull request #639 from marp-team/codecov-test-reports
Browse files Browse the repository at this point in the history
Set up Codecov test results to measure flaky tests
  • Loading branch information
yhatt authored Jan 21, 2025
2 parents 0adb212 + 872bf29 commit c21153a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ commands:
name: Jest
command: npm run test:coverage -- --ci --reporters=default --reporters=jest-junit <<# parameters.runInBand >>-i<</ parameters.runInBand >>
environment:
JEST_JUNIT_CLASSNAME: '{filepath}'
JEST_JUNIT_OUTPUT_DIR: tmp/test-results
MARP_TEST_CI: 1

Expand All @@ -108,6 +109,11 @@ commands:
- store_test_results:
path: tmp/test-results

- codecov/upload:
flags: linux
report_type: test_results
dir: tmp/test-results

- store_artifacts:
path: ./coverage
destination: coverage
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ jobs:
# https://stackoverflow.com/a/59365905
- name: Jest
env:
JEST_JUNIT_CLASSNAME: '{filepath}'
JEST_JUNIT_OUTPUT_DIR: tmp/test-results
MARP_TEST_CI: 1
run: >-
npm run test:coverage -- --ci --max-workers ${{ steps.cpu-cores.outputs.count }} --reporters=default --reporters=jest-junit ||
npm run test:coverage -- --ci -i --reporters=default --reporters=jest-junit --forceExit --no-cache ||
npm run test:coverage -- --ci -i --reporters=default --reporters=jest-junit --forceExit --no-cache ||
npm run test:coverage -- --ci -i --reporters=default --reporters=jest-junit --forceExit --no-cache
npm run test:coverage -- --ci --bail -i --reporters=default --reporters=jest-junit --no-cache ||
npm run test:coverage -- --ci --bail -i --reporters=default --reporters=jest-junit --no-cache ||
npm run test:coverage -- --ci --bail -i --reporters=default --reporters=jest-junit --no-cache
- uses: actions/upload-artifact@v4
with:
Expand All @@ -64,3 +66,9 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: windows

- uses: codecov/test-results-action@v1
if: ${{ !cancelled() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: windows

0 comments on commit c21153a

Please sign in to comment.