Skip to content

Commit

Permalink
CI: don't upload test coverage multiple times
Browse files Browse the repository at this point in the history
Pick a single Postgres version in the matrix and use it to upload coverage.
Other versions just run tests.

Signed-off-by: Riccardo Binetti <[email protected]>
  • Loading branch information
rbino committed Oct 30, 2024
1 parent ae31aa1 commit 01af523
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/backend-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ jobs:
strategy:
matrix:
postgres: [13, 14, 15, 16]
env:
postgres_version_uploading_to_coveralls: 16
runs-on: ubuntu-22.04
services:
postgres:
Expand Down Expand Up @@ -174,9 +176,15 @@ jobs:
mix deps.get --only test
mix deps.compile
- name: Test
# Only send upload coverage from a single test in the matrix
- name: Test and upload coverage
if: matrix.postgres == env.postgres_version_uploading_to_coveralls
run: mix coveralls.github -o coverage_results --warnings-as-errors

- name: Test
if: matrix.postgres != env.postgres_version_uploading_to_coveralls
run: mix test

build-docker-image:
name: Build Docker image
runs-on: ubuntu-latest
Expand Down

0 comments on commit 01af523

Please sign in to comment.