Skip to content

Commit ed9477a

Browse files
committed
ci: enable coverage in github actions
1 parent 44ea35f commit ed9477a

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: CI
22
on:
3+
push:
34
pull_request:
45
jobs:
56
lint:
@@ -27,7 +28,10 @@ jobs:
2728
- name: build (LLVM ${{ matrix.llvm_version }})
2829
# Run the build manually in `nix develop` to keep non-outputs around
2930
run: |
30-
nix develop .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja -DWITH_FLAKY_TESTS=Off -DFORCE_BOOST_STATIC=Off
31+
nix develop .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja \
32+
-DWITH_FLAKY_TESTS=Off \
33+
-DFORCE_BOOST_STATIC=Off \
34+
-DCODE_COVERAGE=On
3135
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ninja -C build
3236
- name: test (LLVM ${{ matrix.llvm_version }})
3337
env:
@@ -46,9 +50,29 @@ jobs:
4650
--repeat until-pass:3 \
4751
--exclude-from-file ../../.github/workflows/tests_failing_under_nix.txt \
4852
--output-junit results.xml
53+
54+
- name: coverage
55+
continue-on-error: true
56+
uses: coverallsapp/github-action@v2
57+
with:
58+
flag-name: run-${{ join(matrix.*, '-') }}
59+
parallel: true
60+
4961
- name: upload results
5062
uses: actions/upload-artifact@v4
5163
if: success() || failure()
5264
with:
5365
name: test-results-${{ matrix.llvm_version }}
5466
path: build/test/results.xml
67+
68+
finalise-coverage:
69+
needs: build-test
70+
if: ${{ always() }}
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: finalise coverage
74+
uses: coverallsapp/github-action@v2
75+
with:
76+
parallel-finished: true
77+
carryforward: "run-15,run-16"
78+

0 commit comments

Comments
 (0)