-
Notifications
You must be signed in to change notification settings - Fork 67
52 lines (47 loc) · 1.39 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
name: PR
on:
pull_request:
branches: [ main ]
env:
GO_VERSION: '^1.20' # Require Go 1.20 and above, but lower than Go 2.0.0
jobs:
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@v4
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@v4
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