-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GHA for e2e test using Kind cluster
Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
- Loading branch information
Showing
2 changed files
with
65 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,51 @@ | ||
name: Controller image deployment and e2e test | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'LICENSE*' | ||
- '**.gitignore' | ||
- '**.md' | ||
- '**.txt' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
- '.github/dependabot.yml' | ||
- 'doc/**' | ||
|
||
jobs: | ||
build-and-test-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Generate Tag | ||
shell: bash | ||
id: tags | ||
run: | | ||
commit_sha=${{ github.event.after }} | ||
tag=main-${commit_sha:0:7} | ||
echo "tag=${tag}" >> $GITHUB_OUTPUT | ||
- name: Build Controller | ||
shell: bash | ||
env: | ||
IMG: "quay.io/opendatahub/odh-model-controller:${{ steps.tags.outputs.tag }}" | ||
run: make IMG=${IMG} docker-build | ||
- name: Start Kind Cluster | ||
uses: helm/kind-action@v1.8.0 | ||
with: | ||
config: ./test/config/kind-e2e-config.yaml | ||
cluster_name: e2e-kind-cluster | ||
- name: Load Local Registry Test Image | ||
env: | ||
IMG: "quay.io/opendatahub/odh-model-controller:${{ steps.tags.outputs.tag }}" | ||
run: | | ||
kind load docker-image -n e2e-kind-cluster ${IMG} | ||
- name: Deploy Controller With Test Image | ||
env: | ||
IMG: "quay.io/opendatahub/odh-model-controller:${{ steps.tags.outputs.tag }}" | ||
run: | | ||
echo "Deploying controller from odh-model-controller branch ${BRANCH}" | ||
make IMG=${IMG} deploy-e2e | ||
- name: Run e2e Tests | ||
timeout-minutes: 20 | ||
run: | | ||
echo "Running e2e Test for odh-model-controller" | ||
make e2e-test |
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,14 @@ | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
kind: Cluster | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 31090 | ||
hostPort: 31090 | ||
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0" | ||
protocol: tcp # Optional, defaults to tcp | ||
- containerPort: 31080 | ||
hostPort: 31080 | ||
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0" | ||
protocol: tcp # Optional, defaults to tcp | ||
- role: worker |