Skip to content

Integration Test suite + kind workflow to add them to ci #1

Integration Test suite + kind workflow to add them to ci

Integration Test suite + kind workflow to add them to ci #1

Workflow file for this run

name: KinD DSPO/DSP system tests
on:
workflow_dispatch:
pull_request:
paths:
- controllers/**
- api/**
- config/**
- tests/**
types:
- opened
- reopened
- closed
- synchronize
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
IMAGE_REPO_DSPO: data-science-pipelines-operator
QUAY_ORG: hukhan
QUAY_ID: ${{ secrets.QUAY_ID }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
DSPA_NAMESPACE: test-dspa
DSPA_NAME: test-dspa
DSPA_DEPLOY_WAIT_TIMEOUT: 300
SYSTEM_TESTS_DIR: ${{ github.workspace }}/tests
jobs:
dspo-tests:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.18.10
uses: actions/setup-go@v1
with:
go-version: 1.18.10
id: go
- name: Setup and start KinD cluster
uses: ./.github/actions/kind
# TODO: Consolidate testing CRDS (2 locations)
- name: Apply OCP CRDs
env:
RESOURCES_DIR: ${{ github.workspace }}/.github/resources
CONFIG_DIR: ${{ github.workspace }}/config
run: |
kubectl apply -f ${{ env.RESOURCES_DIR }}/crds
kubectl apply -f ${{ env.CONFIG_DIR }}/crd/external/route.openshift.io_routes.yaml
- name: Build image
env:
DSPO_IMAGE: ${{env.REGISTRY_ADDRESS}}/data-science-pipelines-operator
run: |
make podman-build -e IMG="${DSPO_IMAGE}"
- name: Deploy DSPO
env:
DSPO_IMAGE: ${{env.REGISTRY_ADDRESS}}/data-science-pipelines-operator
run: |
kubectl create namespace odh-applications
make podman-push -e IMG="${DSPO_IMAGE}"
make deploy-kind -e IMG="${DSPO_IMAGE}"
- name: Wait for DSPO deployment
run: |
kubectl wait -n odh-applications --timeout=60s --for=condition=Available=true deployment data-science-pipelines-operator-controller-manager
- name: Create DSPA Namespace
run: |
kubectl create namespace ${{ env.DSPA_NAMESPACE }}
- name: Run tests
working-directory: ${{ env.SYSTEM_TESTS_DIR }}
env:
NAMESPACE: ${{ env.DSPA_NAMESPACE }}
DSPA_NAME: ${{ env.DSPA_NAME }}
run: |
go run github.com/onsi/ginkgo/v2/ginkgo -- -kubeconfig=$HOME/.kube/config -k8sApiServerHost=$(oc whoami --show-server) -DSPANamespace=${{ env.DSPA_NAMESPACE }} -DSPAPath=resources/dspa-lite.yaml -ginkgo.v
- name: Clean up
run: |
make undeploy-kind