-
Notifications
You must be signed in to change notification settings - Fork 270
57 lines (54 loc) · 1.46 KB
/
golangci.yaml
File metadata and controls
57 lines (54 loc) · 1.46 KB
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
name: golangci-lint
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
merge_group:
types:
- checks_requested
jobs:
generate:
name: Generate BPF Handling Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run go generate
run: make bpf-lib && go generate ./...
- name: Upload generated code
uses: actions/upload-artifact@v6
with:
name: generated-bpf-program-code
path: ./bpf-prog/azure-block-iptables/pkg/blockservice
golangci:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
name: Lint
needs: generate
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Download generated code
uses: actions/download-artifact@v7
with:
name: generated-bpf-program-code
path: ./bpf-prog/azure-block-iptables/pkg/blockservice
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
args: ${{ github.event_name == 'pull_request' && format('--new-from-rev=origin/{0}', github.base_ref) || '' }} --config=.golangci.yml --timeout=25m