forked from mruby/mruby
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.1 KB
/
coverage.yml
File metadata and controls
41 lines (39 loc) · 1.1 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
name: Coverage
on: [push]
jobs:
coverage:
name: Coverage
runs-on: ubuntu-24.04
env:
MRUBY_CONFIG: ci/gcc-clang
CC: clang-18
CXX: clang++-18
LD: clang-18
CFLAGS: -O0 -g --coverage
CXXFLAGS: -O0 -g --coverage
LDFLAGS: --coverage
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v6
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake test
- name: Install gcovr
run: pip install gcovr
- name: Generate coverage report
run: |
{
echo "# Coverage report"
echo \`\`\`
gcovr --gcov-executable "llvm-cov-18 gcov" -e ".*_test.c" -e ".*/test/.*" -s --html-details -o coverage/ build
echo \`\`\`
} > "$GITHUB_STEP_SUMMARY"
- name: Upload coverage report
uses: actions/upload-artifact@v6
with:
name: coverage-${{ github.sha }}
path: coverage/
retention-days: 3