diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 5a3c605e8..f6fc20bb6 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -61,8 +61,8 @@ jobs: cached-pdf-files- enableCrossOsArchive: true - - name: Run unit tests - run: npx gulp unittest --headless + - name: Run unit tests with code coverage + run: npx gulp unittest --headless --coverage --coverage-output build/coverage/unit - name: Save cached PDF files uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 @@ -70,3 +70,13 @@ jobs: path: test/pdfs/*.pdf key: cached-pdf-files-${{ hashFiles('test/pdfs/*.pdf') }} enableCrossOsArchive: true + + - name: Upload results to Codecov + uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + files: ./build/coverage/unit/lcov.info + flags: unittest + name: codecov-umbrella + verbose: true