-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1 KB
/
unit_tests.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
name: Unit tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CC: clang
CXX: clang++
jobs:
unit_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/picsart/luabind:main
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: --user root
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake --preset=luabind -DCODE_COVERAGE=ON
- name: Build
run: cmake --build --preset=luabind --target all
- name: Unit tests
run: ctest --preset=unit_tests
- name: Collect coverage
run: lcov --directory . --capture --output-file coverage.info
- name: Filter coverage
run: lcov --extract coverage.info '*/luabind/include/*' --output-file coverage.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}