-
-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (41 loc) · 1.21 KB
/
test.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
name: Test
on: [push, pull_request]
env:
GITHUB_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
GO111MODULE: "on"
jobs:
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Install C++ dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Check out code
uses: actions/checkout@v2
- name: Checkout out submodules
run: |
git submodule update --init --recursive
git lfs pull
- name: Build shared library
run: |
mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..
cmake --build . --config Release
sudo cp lib/*.so /usr/lib/
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: "1.23"
- name: Install Go dependencies
run: |
go mod download
- name: Run Unit Tests
run: |
go test -tags noasm -race -covermode atomic -coverprofile=profile.cov .
- name: Upload Coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov