-
-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (39 loc) · 962 Bytes
/
Copy pathcoverage.yml
File metadata and controls
44 lines (39 loc) · 962 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: coverage
on:
push:
paths:
- 'go.mod'
- 'go.sum'
- 'internal/**'
- 'cmd/**'
pull_request:
paths:
- 'go.mod'
- 'go.sum'
- 'internal/**'
- 'cmd/**'
workflow_dispatch:
jobs:
coverage:
strategy:
matrix:
go-version: [1.26.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Run tests with coverage
run: go test -race -covermode atomic -coverprofile=profile.cov ./...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=profile.cov -service=github