forked from anvil-verifier/anvil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github workflow for e2e test (anvil-verifier#204)
Add a new yaml file in workflow called e2e-testing.yaml. It will build and deploy two controllers and then run e2e test for each of them. --------- Signed-off-by: ZichengMa <[email protected]>
- Loading branch information
Showing
7 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: e2e Testing | ||
run-name: e2e tests run by ${{ github.actor }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "README.md" | ||
- ".gitignore" | ||
- "doc/**" | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
e2e-testing: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "^1.20" | ||
- name: Install kind | ||
run: go install sigs.k8s.io/[email protected] | ||
- name: Install Rust toolchain | ||
run: | | ||
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y | ||
# For rabbitmq | ||
- name: Build rabbitmq controller image | ||
run: | | ||
cp docker/rabbitmq-controller/Dockerfile . | ||
docker build -t local/rabbitmq-controller:v0.1.0 . | ||
- name: Create kind cluster | ||
run: kind create cluster --config=./e2e/deploy/kind_config.yaml | ||
- name: Deploy rabbitmq controller | ||
run: ./deploy.sh rabbitmq local | ||
- name: Run rabbitmq e2e tests | ||
run: cd e2e && cargo run -- rabbitmq | ||
- name: Tear down kind cluster | ||
run: kind delete clusters kind && sleep 15 | ||
# For zookeeper | ||
- name: Build zookeeper controller image | ||
run: | | ||
cp docker/zookeeper-controller/Dockerfile . | ||
docker build -t local/zookeeper-controller:v0.1.0 . | ||
- name: Create kind cluster | ||
run: kind create cluster --config=./e2e/deploy/kind_config.yaml | ||
- name: Deploy zookeeper controller | ||
run: ./deploy.sh zookeeper local | ||
- name: Run zookeeper e2e tests | ||
run: cd e2e && cargo run -- zookeeper | ||
- name: Tear down kind cluster | ||
run: kind delete clusters kind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
featureGates: | ||
"StatefulSetAutoDeletePVC": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters