-
Notifications
You must be signed in to change notification settings - Fork 141
109 lines (107 loc) · 3.23 KB
/
test.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: test
on:
workflow_dispatch:
pull_request:
paths-ignore:
- "charts/**"
- "docs/**"
- "hack/**"
- "logos/**"
- "rfcs/**"
- "tools/**"
- "*.md"
push:
branches:
- main
permissions:
contents: read # for actions/checkout to fetch code
jobs:
test-1x-2x:
name: "Controller Tests: 10->29"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0000[12]"
test-3x-5x:
name: "Controller Tests: 30->59"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0000[345]"
test-6x-9x:
name: "Controller Tests: 60->99"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0000[6789]"
test-1xx:
name: "Controller Tests: 1xx"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0001"
test-2xx:
name: "Controller Tests: 2xx"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0002"
test-3xx:
name: "Controller Tests: 3xx"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0003"
test-99xx:
name: "Controller Tests: 99xx"
uses: ./.github/workflows/targeted-test.yaml
with:
pattern: "^Test_0099"
non-numbered:
name: "Controller Tests: Non-numbered"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Terraform
run: |
export TF_VERSION=1.3.9
wget https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip
unzip -q terraform_${TF_VERSION}_linux_amd64.zip
mv terraform $(which terraform)
terraform --version
- name: Setup Kustomize
if: "!github.event.pull_request.head.repo.fork"
uses: fluxcd/pkg/actions/kustomize@6c0b4426ba7809a9406c1a4e07aa4be4984ea72f # main
- name: Run tests
run: |
make install-envtest
make normal-controller-test
internal:
name: "Internal Tests"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup Terraform
run: |
export TF_VERSION=1.3.9
wget https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip
unzip -q terraform_${TF_VERSION}_linux_amd64.zip
mv terraform $(which terraform)
terraform --version
- name: Setup Kustomize
if: "!github.event.pull_request.head.repo.fork"
uses: fluxcd/pkg/actions/kustomize@6c0b4426ba7809a9406c1a4e07aa4be4984ea72f # main
- name: Run tests
run: |
make install-envtest
make test-internal