-
Notifications
You must be signed in to change notification settings - Fork 26
56 lines (46 loc) · 1.29 KB
/
cibuild.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
name: Build
on:
push:
branches: [ main, v2 ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🧱 Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
- name: 🎗️ Check go mod
run: |
go mod tidy
git diff --exit-code -- go.mod
git diff --exit-code -- go.sum
- name: 🧹 Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: 🛡️ Lint
uses: golangci/golangci-lint-action@v3.7.0
with:
version: latest
skip-cache: true
- name: 🏗️ Build
run: make build
- name: 👮 Run Tests and Check Code Coverage
run: |
make ci-coverage
- name: 📮 Upload Code Coverage Stats
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false # optional (default = false)
files: coverage.out # optional
flags: unittests # optional
name: codecov-umbrella # optional
verbose: true # optional (default = false)
env:
CODECOV_TOKEN: ${{ secrets.CODECOVTOKEN }}