-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.18 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint code
runs-on: ubuntu-latest
env:
GOLANGCI_LINT_VERSION: v1.60.1 # github-releases:golangci/golangci-lint
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Lint code
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
skip-pkg-cache: true
skip-build-cache: true
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Unit tests
run: |
go test -v -race -gcflags=-l ./...
go test -gcflags=-l -covermode=count -coverprofile=profile.cov ./...
- name: Goveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov