-
-
Notifications
You must be signed in to change notification settings - Fork 12
49 lines (42 loc) · 1.07 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
name: Go
on:
push:
branches: [master, v2, v3]
paths:
- "**.go"
- "**.mod"
- "**.sum"
- "**.yml"
pull_request:
branches: [master, v2, v3]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
id: go
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: latest
github-token: ${{ github.token }}
only-new-issues: true
- name: Get dependencies
run: go mod vendor
- name: Go Test
run: go test -timeout 120s -coverprofile=coverage.out
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_TOKEN }}
coverage-reports: "coverage.out"
force-coverage-parser: go
language: go