-
Notifications
You must be signed in to change notification settings - Fork 77
51 lines (49 loc) · 1.66 KB
/
codecov.yml
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
name: Producer C SDK Codecov
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
linux-gcc-code-coverage:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Build repository
run: |
sudo apt install lcov
mkdir build && cd build
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_COMMON_LWS=TRUE
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
aws-region: ${{ secrets.AWS_REGION }}
role-duration-seconds: 10800
- name: Run tests
run: |
cd build
ulimit -c unlimited -S
source ../scripts/get-iot-certs.sh ci
timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure
- name: Generate and process coverage data with lcov
run: |
cd build
lcov --capture --directory CMakeFiles/cproducer.dir --directory CMakeFiles/kvsCommonCurl.dir --directory CMakeFiles/kvsCommonLws.dir --output-file coverage.info
lcov --list coverage.info
lcov --remove coverage.info '*jsmn*' -o coverage_filtered.info
lcov --list coverage_filtered.info
rm coverage.info
bash <(curl -s https://codecov.io/bash) -f ./coverage_filtered.info -t ${{ secrets.CODECOV_TOKEN }} -Z