Skip to content

Commit 22a628b

Browse files
authored
Merge pull request #327 from rabbitmq/pr-pipeline
Run tests for PRs
2 parents f29610a + 2e5ca22 commit 22a628b

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/pr.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
9+
unit_integration_tests:
10+
name: unit and integration tests
11+
runs-on: ubuntu-latest
12+
container: us.gcr.io/cf-rabbitmq-for-k8s-bunny/rabbitmq-for-kubernetes-ci
13+
steps:
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v2
16+
- name: Unit tests
17+
run: make unit-tests
18+
- name: Integration tests
19+
run: make integration-tests
20+
- name: Helm chart tests
21+
working-directory: charts/rabbitmq
22+
run: ./test.sh
23+
24+
system_tests:
25+
name: system tests
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Check out code into the Go module directory
29+
uses: actions/checkout@v2
30+
- name: System tests
31+
run: |
32+
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
33+
export GOPATH=$HOME/go
34+
export PATH=$PATH:$GOPATH/bin
35+
make install-tools
36+
kind create cluster
37+
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind
38+
make system-tests

system_tests/system_tests.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ CONSOLE_LOG=new`
389389
BeforeEach(func() {
390390
instanceName := "mqtt-stomp-rabbit"
391391
cluster = generateRabbitmqCluster(namespace, instanceName)
392+
cluster.Spec.Resources = &corev1.ResourceRequirements{
393+
Requests: map[corev1.ResourceName]k8sresource.Quantity{},
394+
Limits: map[corev1.ResourceName]k8sresource.Quantity{},
395+
}
392396
cluster.Spec.Service.Type = "NodePort"
393397
cluster.Spec.Rabbitmq.AdditionalPlugins = []rabbitmqv1beta1.Plugin{
394398
"rabbitmq_mqtt",

0 commit comments

Comments
 (0)