Allow disabling coverage for downstream testing (#10198)
parent
b870f6166c
commit
0aead925d3
|
@ -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 New Issue