diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ebc17831a8..56638218e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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=/test/slowReporter.js' --max-workers ${{ steps.cpu-cores.outputs.count }}" + run: | + echo "extra-reporter='--reporters=/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