-
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (28 loc) · 821 Bytes
/
go.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
name: Go
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: go build -v .
- name: Test
run: go test -coverprofile="coverage.txt" -covermode=atomic -p 1 ./...
- name: Upload coverage to Codecov
if: success() && matrix.os == 'ubuntu-latest'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}