-
Notifications
You must be signed in to change notification settings - Fork 46
53 lines (45 loc) · 1.79 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
52
53
name: Codecov
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Code coverage
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# needed for codecov
fetch-depth: 0
- name: Build CRIU criu-dev
run: |
sudo apt-get install -y libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet-dev libcap-dev curl unzip
git clone --depth=1 --single-branch -b criu-dev https://github.com/checkpoint-restore/criu.git
make -j"$(nproc)" -C criu
sudo make -C criu install-criu PREFIX=/usr
- name: Install Go 1.22.x
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Install protoc-gen-go
run: sudo env "GOBIN=/usr/bin" go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- name: Run tests and collect coverage
run: |
sudo -E make test
sudo -E make -C scripts/magic-gen test
# First update protobuf. It is too old in the Ubuntu image.
curl -Lo protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
sudo unzip -o protoc.zip -d /usr
# We need to use the protobuf definitions from the criu-dev
# branch as it might have changed.
sudo -E make -C scripts/proto-gen proto-update GIT_BRANCH=criu-dev
sudo -E make -C scripts/proto-gen
sudo -E make -C crit clean bin/crit
sudo -E make -C crit unit-test
sudo -E make -C test crit-test
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: .coverage/coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true