-
Notifications
You must be signed in to change notification settings - Fork 86
28 lines (26 loc) · 992 Bytes
/
coverage.yml
File metadata and controls
28 lines (26 loc) · 992 Bytes
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
name: Coverage
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install lcov 1.15
run: |
sudo apt install perl libjson-perl libperlio-gzip-perl libcapture-tiny-perl
git clone --depth=1 https://github.com/linux-test-project/lcov.git
cd lcov
sudo make install
cd ..
- name: Build LuaFormatter
run: |
git submodule update --init
cmake -DCMAKE_BUILD_TYPE=Debug
make
CTEST_OUTPUT_ON_FAILURE=1 ctest
- name: Run lcov and upload to codecov
run: |
lcov --directory . --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-9;
lcov --remove coverage.info '*/usr/*' '*/test/*' '*/generated/*' '*/third_party/*' --output-file coverage.info;
lcov --list coverage.info;
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} || echo "Codecov did not collect coverage reports";