-
Notifications
You must be signed in to change notification settings - Fork 69
69 lines (60 loc) · 1.68 KB
/
pr.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
name: PR
on:
pull_request:
branches: [ main ]
env:
GO_VERSION: '1.22.x' # Require Go 1.22.x
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
unit_tests:
name: unit tests
runs-on: ubuntu-latest
container: us.gcr.io/cf-rabbitmq-for-k8s-bunny/rabbitmq-for-kubernetes-ci
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Unit tests
run: make unit-tests
- name: Integration tests
run: make integration-tests
system_tests:
name: system tests
runs-on: ubuntu-latest
strategy:
matrix:
k8s: [v1.22.17, v1.26.3]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: System tests
env:
K8S_VERSION: ${{ matrix.k8s }}
run: |
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
make install-tools cmctl
kind create cluster --image kindest/node:"$K8S_VERSION"
make cert-manager cluster-operator
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind BUILD_KIT=docker
make system-tests BUILD_KIT=docker