Skip to content

Commit

Permalink
ci: run coverage only when required
Browse files Browse the repository at this point in the history
Before this patch, we ran coverage tests even when results weren't used
in coveralls. Running coverage tests is significantly more expensive
(up to 5 times in length).
  • Loading branch information
DifferentialOrange committed Jun 7, 2023
1 parent 0c51def commit 8f6eff1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests and code coverage analysis
run: make -C build coverage
- name: Run tests
if: matrix.coveralls != true # See https://github.com/actions/runner/issues/1173
run: make -C build luatest-no-coverage

- name: Send code coverage to coveralls.io
- name: Run tests with coverage and send results to coveralls.io
run: make -C build coveralls
if: ${{ matrix.coveralls }}

Expand Down Expand Up @@ -153,5 +154,5 @@ jobs:

- run: cmake -S . -B build

- name: Run tests and code coverage analysis
run: make -C build coverage
- name: Run tests
run: make -C build luatest-no-coverage

0 comments on commit 8f6eff1

Please sign in to comment.