-
Notifications
You must be signed in to change notification settings - Fork 78
66 lines (63 loc) · 1.8 KB
/
checks.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
61
62
63
64
65
66
name: Checks
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
env:
GO_VERSION: "1.20"
jobs:
check-links:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: lycheeverse/[email protected]
with:
args: >-
-v -n "*.md" "**/*.md"
--exclude "http://localhost*"
fail: true
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/[email protected]
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Checkout Repo
uses: actions/[email protected]
- name: Module cache
uses: actions/[email protected]
env:
cache-name: go-mod-cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
- name: Tools cache
uses: actions/[email protected]
env:
cache-name: go-tools-cache
with:
path: ~/.tools
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }}
- name: Install build dependencies
run: |
sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev
- name: Run linters
run: make license-header-check go-mod-tidy golangci-lint
- name: Check clean repository
run: make check-clean-work-tree
verify-licenses:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup Go
uses: actions/[email protected]
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y clang llvm libbpf-dev
- run: make verify-licenses