Allow disabling coverage for downstream testing (#10198)
This commit is contained in:
parent
b870f6166c
commit
0aead925d3
1 changed files with 11 additions and 6 deletions
17
.github/workflows/tests.yml
vendored
17
.github/workflows/tests.yml
vendored
|
@ -39,16 +39,21 @@ jobs:
|
|||
id: cpu-cores
|
||||
uses: SimenB/github-actions-cpu-cores@v1
|
||||
|
||||
- name: Run tests with coverage and metrics
|
||||
- name: Load metrics reporter
|
||||
id: metrics
|
||||
if: github.ref == 'refs/heads/develop'
|
||||
run: "yarn coverage --ci --reporters github-actions '--reporters=<rootDir>/test/slowReporter.js' --max-workers ${{ steps.cpu-cores.outputs.count }}"
|
||||
run: |
|
||||
echo "extra-reporter='--reporters=<rootDir>/test/slowReporter.js'" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Run tests with coverage
|
||||
if: github.ref != 'refs/heads/develop'
|
||||
run: "yarn coverage --ci --reporters github-actions --max-workers ${{ steps.cpu-cores.outputs.count }}"
|
||||
- name: Run tests
|
||||
run: |
|
||||
yarn ${{ inputs.disable_coverage != 'true' && 'coverage' || 'test' }} \
|
||||
--ci \
|
||||
--reporters github-actions ${{ steps.metrics.outputs.extra-reporter }} \
|
||||
--max-workers ${{ steps.cpu-cores.outputs.count }}
|
||||
|
||||
- name: Upload Artifact
|
||||
if: inputs.matrix-js-sdk-sha == ''
|
||||
if: inputs.disable_coverage != 'true'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage
|
||||
|
|
Loading…
Reference in a new issue