-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (45 loc) · 1.72 KB
/
coverage.yml
File metadata and controls
54 lines (45 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Coverage
on:
pull_request:
branches:
- develop
jobs:
code-coverage:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Extract test files
run: |
cd rust/virtualbow/data
7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }}
- name: Generate code coverage for solver tests
run: |
cd rust/virtualbow
rustup default nightly
cargo llvm-cov --release --branch --no-report
cargo llvm-cov report --release --html --output-dir "."
cargo llvm-cov report --release --text --output-dir "."
- name: Upload coverage report artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: rust/virtualbow/html
- name: Create report summary file
run: |
echo "# Coverage Report for ${GITHUB_SHA::7}" >> summary.md
echo "This is an automatic summary of the test coverage results for the latest commit on this pull request." >> summary.md
echo "The full report can be downloaded [here](${{ steps.artifact-upload-step.outputs.artifact-url }})." >> summary.md
echo '```' >> summary.md
echo "$(<rust/virtualbow/text/index.txt)" >> summary.md
echo '```' >> summary.md
- name: Add summary as a pull request comment
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: summary.md