-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.08 KB
/
pr_lint_and_test.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
name: Lint & Test
on:
pull_request:
workflow_dispatch:
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
test:
name: Unit Tests
runs-on: ubuntu-20.04
env:
DOCKER_DOWNLOAD_TIMEOUT_MIN: 3000
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.22.0'
- run: |
go version
go install github.com/boumenot/gocover-cobertura@latest
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: |
go test -parallel 4 -v ./...
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --config=./.golangci.yml
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.63.0
skip-cache: false
skip-pkg-cache: false
skip-build-cache: false