Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 0aead92

Browse files
authored
Allow disabling coverage for downstream testing (#10198)
1 parent b870f61 commit 0aead92

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,21 @@ jobs:
3939
id: cpu-cores
4040
uses: SimenB/github-actions-cpu-cores@v1
4141

42-
- name: Run tests with coverage and metrics
42+
- name: Load metrics reporter
43+
id: metrics
4344
if: github.ref == 'refs/heads/develop'
44-
run: "yarn coverage --ci --reporters github-actions '--reporters=<rootDir>/test/slowReporter.js' --max-workers ${{ steps.cpu-cores.outputs.count }}"
45+
run: |
46+
echo "extra-reporter='--reporters=<rootDir>/test/slowReporter.js'" >> $GITHUB_OUTPUT
4547
46-
- name: Run tests with coverage
47-
if: github.ref != 'refs/heads/develop'
48-
run: "yarn coverage --ci --reporters github-actions --max-workers ${{ steps.cpu-cores.outputs.count }}"
48+
- name: Run tests
49+
run: |
50+
yarn ${{ inputs.disable_coverage != 'true' && 'coverage' || 'test' }} \
51+
--ci \
52+
--reporters github-actions ${{ steps.metrics.outputs.extra-reporter }} \
53+
--max-workers ${{ steps.cpu-cores.outputs.count }}
4954
5055
- name: Upload Artifact
51-
if: inputs.matrix-js-sdk-sha == ''
56+
if: inputs.disable_coverage != 'true'
5257
uses: actions/upload-artifact@v3
5358
with:
5459
name: coverage

0 commit comments

Comments
 (0)