-
Notifications
You must be signed in to change notification settings - Fork 39
65 lines (53 loc) · 1.64 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
54
55
56
57
58
59
60
61
62
63
64
65
name: Go
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19.12
- name: Clang
run: |
apt search clang
# sudo apt-get install -f -y clang llvm
# TODO: add different clang versions
sudo apt-get install -f -y llvm-11 clang-11
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 2000
# view priority
sudo update-alternatives --config clang
# view version
clang --version
- name: Download
run: |
go mod download
- name: Lint
run: |
./scripts/lint.sh
- name: Build
run: |
go build -v
- name: Race test
run: |
go test -run=TestIntegrationScripts/tests/ctype.c -race -v -timeout=30m
- name: Coverage
run: |
go get -u github.com/wadey/gocovmerge
go get -u github.com/Konstantin8105/cs
go get -u golang.org/x/sys/unix
#TRAVIS=true ./scripts/test.sh
- name: Run Tests
run: |
echo "" > coverage.txt
go test -coverprofile=1.txt -covermode=atomic .
cat 1.txt > coverage.txt
go test -coverprofile=1.txt -covermode=atomic github.com/Konstantin8105/ast
cat 1.txt > coverage.txt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)
file: coverage.txt