File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,19 +67,19 @@ jobs:
6767 node-version : ${{ matrix.node_version }}
6868 cache : " npm"
6969 - run : npm ci --ignore-scripts
70- - run : npm run ${{ inputs.npm-script }}
70+ - id : npm-script
71+ run : npm run ${{ inputs.npm-script }}
7172 env :
7273 BROWSER : ${{ matrix.browser }}
7374 COVERAGE : ${{ inputs.coverage && '1'}}
7475 NODE_OPTIONS : " --trace-warnings"
75- # Generate and upload coverage, even if tests fail
7676 - name : Generate coverage report
77- if : always () && inputs.coverage
77+ if : ${{ !cancelled () && inputs.coverage && (steps.npm-script.conclusion == 'success' || steps.npm-script.conclusion == 'failure') }}
7878 run : npm run test-coverage-generate
7979 # https://github.com/marketplace/actions/codecov
8080 # https://app.codecov.io/gh/mochajs/mocha
8181 - name : Upload coverage reports
82- if : always () && inputs.coverage
82+ if : ${{ !cancelled () && inputs.coverage && (steps.npm-script.conclusion == 'success' || steps.npm-script.conclusion == 'failure') }}
8383 uses : codecov/codecov-action@v7
8484 with :
8585 fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments