-
Notifications
You must be signed in to change notification settings - Fork 202
88 lines (83 loc) · 2.24 KB
/
lib-validate.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: validate
on:
workflow_call:
permissions:
contents: read
jobs:
docs:
name: Check docs are buildable
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up doc directory
run: |
mkdir $HOME/output
touch $HOME/output/.nojekyll
- name: Build latest
run: |
GITHUB_SHA=$(git rev-parse HEAD)
export GITHUB_SHA
rm -rf _work/venv
make vhtml
mv _build/html/* $HOME/output/
golangci:
permissions:
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: v1.55.2
args: -v --timeout 5m
build:
name: Build and check device plugins
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Check Dockerfiles
run: make check-dockerfiles
- run: make go-mod-tidy
- run: make BUILDTAGS=kerneldrv
- run: make test BUILDTAGS=kerneldrv
- run: make check-github-actions
#- name: Codecov report
# run: bash <(curl -s https://codecov.io/bash)
envtest:
name: Test APIs using envtest
runs-on: ubuntu-22.04
strategy:
matrix:
version:
- 1.28.x
- 1.29.x
- 1.30.x
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Install envtest and k8s control plane
run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
setup-envtest use ${{ matrix.version }}
- name: Run envtest
run: |
KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${{ matrix.version }}) make envtest