-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.01 KB
/
CI.yaml
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
name: "CI"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
name: "Unit test"
runs-on: 'ubuntu-latest'
steps:
- name: "[Checkout] repository"
uses: actions/checkout@v4
- name: "[Golang] Install Go"
uses: actions/setup-go@v5
with:
go-version: "1.24.1"
- name: "[Golang] Check go version"
run: go version
- name: "[Golang] Go mod tidy"
run: go mod tidy
- name: "[Golang] Go test"
run: |
go test -race -covermode=atomic -coverprofile=reflector.out ./reflector
go test -race -covermode=atomic -coverprofile=config.out ./config
go test -race -covermode=atomic -coverprofile=resource.out ./resource
- name: "[Codecov] Upload coverage"
uses: codecov/codecov-action@v5
with:
files: reflector.out,config.out,resource.out
flags: unittests # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)