-
-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (57 loc) · 1.45 KB
/
build.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
name: Build
on:
push:
branches:
- master
- build/*
pull_request:
branches:
- master
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.57.2
args: --timeout 10m
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Setup Go"
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Build Binary
run: go build ./cmd/e3dc
- name: Run Test
run: go test -race -coverprofile coverage.out -covermode atomic -v ./...
- name: Upload Coverage
uses: codecov/codecov-action@v5
with:
files: ./coverage.out
verbose: true
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}