Skip to content

Commit 965ef81

Browse files
committed
[WIP] Add unit test workflow
1 parent fd5bc06 commit 965ef81

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/unit-tests.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/unit-tests.yml"
7+
- 'extras/test/**'
8+
- 'src/**'
9+
10+
push:
11+
paths:
12+
- ".github/workflows/unit-tests.yml"
13+
- 'extras/test/**'
14+
- 'src/**'
15+
16+
jobs:
17+
test:
18+
name: Run unit tests
19+
runs-on: ubuntu-latest
20+
21+
env:
22+
COVERAGE_DATA_PATH: extras/coverage-data/coverage.info
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
28+
- uses: arduino/cpp-test-action@main
29+
with:
30+
runtime-path: |
31+
- extras/test/build/bin/TEST_TARGET_UUID
32+
- extras/test/build/bin/TEST_TARGET_DISC_DEVICE
33+
- extras/test/build/bin/TEST_TARGET_ADVERTISING_DATA
34+
coverage-exclude-paths: |
35+
- '*/extras/test/*'
36+
- '/usr/*'
37+
coverage-data-path: ${{ env.COVERAGE_DATA_PATH }}
38+
39+
- name: Upload coverage report to Codecov
40+
uses: codecov/codecov-action@v1
41+
with:
42+
file: "${{ env.COVERAGE_DATA_PATH }}"
43+
fail_ci_if_error: true
44+
45+

0 commit comments

Comments
 (0)