-
Notifications
You must be signed in to change notification settings - Fork 135
55 lines (52 loc) · 1.35 KB
/
pre-commit.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
name: Pre-commit checks
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: .go_version
- name: Check license
run: make license-check
- name: Go lint
run: make lint
- name: Run Version Check
run: make pseudo
- name: Run ShellCheck
run: make check_scripts
- name: Unit tests
run: make test
- name: Code coverage
uses: codecov/codecov-action@v3
with:
files: build/coverage.txt
e2e-tests:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
k8s: [v1.27.3, v1.26.6, v1.25.11, v1.24.15]
plugin: ['', '--plugin']
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: .go_version
- run: ./scripts/run-e2e-tests.sh -a "test" -n "yk8s" -v "kindest/node:${KIND_NODE_IMAGE}" ${KIND_EXTRA_ARGS}
env:
KIND_NODE_IMAGE: ${{ matrix.k8s }}
KIND_EXTRA_ARGS: ${{ matrix.plugin }}