-
Notifications
You must be signed in to change notification settings - Fork 36
62 lines (52 loc) · 1.48 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches:
- main
env:
CGO_ENABLED: 0
GO_VERSION: '1.20'
jobs:
validate:
name: "Validate ${{ matrix.target }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["verify", "lint", "test"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
- uses: actions/cache@v3
with:
path: hack/tools/bin
key: ${{ runner.os }}-tools-bin-${{ matrix.target }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-tools-bin-${{ matrix.target }}-
${{ runner.os }}-tools-bin-
- uses: actions/cache@v3
if: ${{ matrix.target == 'test' }}
with:
path: /tmp/kubebuilder-tools-*.tar.gz
key: ${{ runner.os }}-tmp-${{ matrix.target }}-${{ hashFiles('scripts/fetch_ext_bins.sh') }}
restore-keys: |
${{ runner.os }}-tmp-${{ matrix.target }}-
${{ runner.os }}-tmp-
- name: ${{ matrix.target }}
run: make ${{ matrix.target }}
codespell:
name: Codespell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/[email protected]
with:
check_filenames: true
check_hidden: true
skip: "./.git,./go.mod,./go.sum"
ignore_words_list: ro