forked from rancher/security-scan
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (65 loc) · 1.62 KB
/
tests.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests
on:
push:
pull_request:
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- run: make validate
test:
strategy:
fail-fast: false
matrix:
# Run tests across all platforms, to ensure developers
# can use any environment to run basic tests.
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
needs: [ validate ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- run: make test
e2e:
strategy:
fail-fast: false
matrix:
k8s-version: [v1.27.3, v1.28.0, v1.29.0]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
needs: [ validate ]
steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout code
uses: actions/checkout@v4
- name: E2E Tests
env:
KUBERNETES_VERSION: ${{ matrix.k8s-version }}
run: make e2e
build-image:
runs-on: ubuntu-latest
needs: [ validate ]
steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Image build
run: make test-image