Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
Implement MobilityData#408 - Build and collect js test coverage repor…
Browse files Browse the repository at this point in the history
…ts (MobilityData#456)

* build and collect js test coverage report
- update github workflow
- update circleci workflow
  • Loading branch information
lionel-nj authored Oct 26, 2020
1 parent 05c9ba0 commit 73f16bc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ jobs:
name: Compress JS test report
command: |
tar -C application/web-app/react-client/test-reports/ -cvf js-tests-v1.3.0-SNAPSHOT.tar .
- run:
name: Compress JS test coverage report
command: |
tar -C application/web-app/react-client/build/coverage -cvf js-tests-coverage-v1.3.0-SNAPSHOT.tar .
- store_artifacts:
path: java-tests-v1.3.0-SNAPSHOT.tar
destination: java-tests-v1.3.0-SNAPSHOT.tar
- store_artifacts:
path: js-tests-v1.3.0-SNAPSHOT.tar
destination: js-tests-v1.3.0-SNAPSHOT.tar
- store_artifacts:
path: js-tests-coverage-v1.3.0-SNAPSHOT.tar
destination: js-tests-coverage-v1.3.0-SNAPSHOT.tar
doc:
docker:
- image: circleci/openjdk:11
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test_pack_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ jobs:
with:
name: Test report - JavaScript -- ${{ steps.prep.outputs.versionTag }}
path: application/web-app/react-client/test-reports/
- name: Persist JS tests coverage report
uses: actions/upload-artifact@v2
with:
name: Test coverage report - JavaScript -- ${{ steps.prep.outputs.versionTag }}
path: application/web-app/react-client/build/coverage

pack:
needs: [test]
Expand Down
4 changes: 2 additions & 2 deletions application/web-app/react-client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ module.exports = {
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,
collectCoverage: true,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,

// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
coverageDirectory: "build/coverage",

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
Expand Down

0 comments on commit 73f16bc

Please sign in to comment.