Skip to content

Commit

Permalink
test: properly detect + optimize example suite (#13640)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Co-authored-by: Alan Clucas <alan@clucas.org>
  • Loading branch information
agilgur5 and Joibel authored Sep 24, 2024
1 parent 5244064 commit 554fb0c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jobs:
- Dockerfile
- manifests/**
- sdks/**
# example test suite
- examples/**
- hack/test-examples.sh
codegen:
- *common
# generated files
Expand Down Expand Up @@ -196,46 +199,46 @@ jobs:
include:
- test: test-executor
profile: minimal
useApi: false
use-api: false
- test: test-corefunctional
profile: minimal
useApi: false
use-api: false
- test: test-functional
profile: minimal
useApi: false
use-api: false
- test: test-api
profile: mysql
useApi: true
use-api: true
- test: test-cli
profile: mysql
useApi: true
use-api: true
- test: test-cron
profile: minimal
useApi: false
use-api: false
- test: test-examples
profile: minimal
useApi: false
use-api: false
- test: test-plugins
profile: plugins
useApi: false
use-api: false
- test: test-java-sdk
profile: minimal
useApi: true
use-api: true
- test: test-python-sdk
profile: minimal
useApi: true
use-api: true
- test: test-executor
install_k3s_version: v1.28.13+k3s1
profile: minimal
useApi: false
use-api: false
- test: test-corefunctional
install_k3s_version: v1.28.13+k3s1
profile: minimal
useApi: false
use-api: false
- test: test-functional
install_k3s_version: v1.28.13+k3s1
profile: minimal
useApi: false
use-api: false
steps:
- name: Install socat (needed by Kubernetes)
run: sudo apt-get -y install socat
Expand Down Expand Up @@ -294,17 +297,17 @@ jobs:
run: make controller kit STATIC_FILES=false
- name: Build CLI
run: make cli STATIC_FILES=false
if: ${{matrix.useApi}}
if: ${{matrix.use-api}}
- name: Start controller/API
run: |
make start PROFILE=${{matrix.profile}} \
AUTH_MODE=client STATIC_FILES=false \
LOG_LEVEL=info \
API=${{matrix.useApi}} \
API=${{matrix.use-api}} \
UI=false \
POD_STATUS_CAPTURE_FINALIZER=true > /tmp/argo.log 2>&1 &
- name: Wait for controller to be up
run: make wait API=${{matrix.useApi}}
run: make wait API=${{matrix.use-api}}
timeout-minutes: 5
- name: Run tests ${{matrix.test}}
run: make ${{matrix.test}} E2E_SUITE_TIMEOUT=20m STATIC_FILES=false
Expand Down
9 changes: 6 additions & 3 deletions hack/test-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ done
trap 'kubectl get wf' EXIT

grep -lR 'workflows.argoproj.io/test' examples/* | while read f ; do
kubectl delete workflow -l workflows.argoproj.io/test
echo "Running $f..."
kubectl create -f $f
name=$(kubectl get workflow -o name)
name=$(kubectl create -f $f -o name)

echo "Waiting for completion of $f..."
kubectl wait --for=condition=Completed $name
phase="$(kubectl get $name -o 'jsonpath={.status.phase}')"
echo " -> $phase"
test Succeeded == $phase

echo "Deleting $f..."
kubectl delete $name
done

0 comments on commit 554fb0c

Please sign in to comment.