Skip to content

Commit

Permalink
Merge pull request #327 from rabbitmq/pr-pipeline
Browse files Browse the repository at this point in the history
Run tests for PRs
  • Loading branch information
coro authored Sep 15, 2020
2 parents f29610a + 2e5ca22 commit 22a628b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PR

on:
pull_request:
branches: [ main ]

jobs:

unit_integration_tests:
name: unit and integration tests
runs-on: ubuntu-latest
container: us.gcr.io/cf-rabbitmq-for-k8s-bunny/rabbitmq-for-kubernetes-ci
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Unit tests
run: make unit-tests
- name: Integration tests
run: make integration-tests
- name: Helm chart tests
working-directory: charts/rabbitmq
run: ./test.sh

system_tests:
name: system tests
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: System tests
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
make install-tools
kind create cluster
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind
make system-tests
4 changes: 4 additions & 0 deletions system_tests/system_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ CONSOLE_LOG=new`
BeforeEach(func() {
instanceName := "mqtt-stomp-rabbit"
cluster = generateRabbitmqCluster(namespace, instanceName)
cluster.Spec.Resources = &corev1.ResourceRequirements{
Requests: map[corev1.ResourceName]k8sresource.Quantity{},
Limits: map[corev1.ResourceName]k8sresource.Quantity{},
}
cluster.Spec.Service.Type = "NodePort"
cluster.Spec.Rabbitmq.AdditionalPlugins = []rabbitmqv1beta1.Plugin{
"rabbitmq_mqtt",
Expand Down

0 comments on commit 22a628b

Please sign in to comment.