diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 99b5ed8a8..b2e078ccb 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -30,6 +30,7 @@ jobs: run: npm run coverage - name: Upload to coveralls.io + if: ${{ github.ref_name == 'main' }} # skip upload on non-main branches env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/build/coverage-bridge.js b/build/coverage-bridge.js index 1ca8d0fbe..fdf48d081 100644 --- a/build/coverage-bridge.js +++ b/build/coverage-bridge.js @@ -12,7 +12,7 @@ window.__grunt_contrib_qunit__.apply(window, arguments); } - QUnit.done(function () { + QUnit.on('runEnd', function () { // send coverage data if available if (window.__coverage__) { sendMessage('qunit.coverage', window.location.pathname, window.__coverage__);