-
-
Notifications
You must be signed in to change notification settings - Fork 3
29 lines (29 loc) · 815 Bytes
/
Copy pathgolang.yml
File metadata and controls
29 lines (29 loc) · 815 Bytes
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
name: Golang
on: [push]
env:
GO111MODULE: on
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup Go for use with actions
uses: actions/setup-go@v2
with:
go-version: 1.21
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run tests
run: go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: goveralls -coverprofile=covprofile