-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding github action to do the operator end-to-end testing. This acti…
…on will create a kind cluster and runs the tests on it. Signed-off-by: lrangine <[email protected]>
- Loading branch information
1 parent
de2d304
commit 3638676
Showing
2 changed files
with
59 additions
and
0 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,58 @@ | ||
# .github/workflows/operator-e2e-integration-tests.yml | ||
name: Operator e2e tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- labeled | ||
|
||
jobs: | ||
operator-e2e-tests: | ||
if: | ||
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) || | ||
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) && | ||
github.repository == 'feast-dev/feast' | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
kind: | ||
# Specify the Kubernetes version | ||
image: kindest/node:v1.30.6 | ||
|
||
env: | ||
KIND_CLUSTER: "operator-e2e-cluster" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21.0' | ||
|
||
- name: Create KIND cluster | ||
run: | | ||
kind create cluster --name $KIND_CLUSTER --wait 5m | ||
- name: Set up kubernetes context | ||
run: | | ||
kubectl config use-context kind-$KIND_CLUSTER | ||
echo "kind context is switched to cluster kind-$KIND_CLUSTER" | ||
- name: Run E2E tests | ||
run: | | ||
# Run the e2e tests | ||
cd infra/feast-operator/ | ||
make test-e2e | ||
- name: Clean up | ||
if: always() | ||
run: | | ||
# Delete the KIND cluster after tests | ||
kind delete cluster --name kind-$KIND_CLUSTER |
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