-
Notifications
You must be signed in to change notification settings - Fork 136
54 lines (46 loc) · 1.09 KB
/
lint.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
47
48
49
50
51
52
53
54
name: "Linting"
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
contents: read
pull-requests: read
jobs:
lint-openapi:
name: Lint OpenAPI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: OpenAPI Lint Checks
uses: char0n/swagger-editor-validate@v1
with:
definition-file: api/v1/testkube.yaml
lint-go:
name: Lint Go
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Go Cache
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint using golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m
only-new-issues: true