-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.04 KB
/
Copy pathbuild.yaml
File metadata and controls
48 lines (39 loc) · 1.04 KB
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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version: ['1.26']
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go_version }}
- name: Get dependencies
run: |
go mod download
- name: Build
run: go build -v ./...
- name: Test
run: "go test -v -short -race -coverprofile='coverage.out' ./..."
shell: bash
- name: Code coverage
uses: codecov/codecov-action@v7
with:
env_vars: OS,GO
files: ./coverage.out
flags: unittests
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true