-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (50 loc) · 1.3 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Go
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- master
- /refs/heads/master
defaults:
run:
working-directory: ./src/github.com/SSHcom/privx-sdk-go
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.21'
- name: Checkout code
uses: actions/checkout@v2
with:
path: src/github.com/SSHcom/privx-sdk-go
- name: Get source dependencies
run: |
go mod download -json
- name: Install CI tools
run: |
go install github.com/mattn/goveralls@latest
go install github.com/lawrencewoodman/roveralls@latest
- name: Install staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run go vet
run: |
go vet ./...
- name: Run staticcheck
run: |
staticcheck ./...
- name: Run go test
run: |
go test ./...
- name: Run coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GOPATH=${GITHUB_WORKSPACE} roveralls
GOPATH=${GITHUB_WORKSPACE} goveralls -coverprofile=roveralls.coverprofile -service=github