File tree Expand file tree Collapse file tree 2 files changed +64
-2
lines changed Expand file tree Collapse file tree 2 files changed +64
-2
lines changed Original file line number Diff line number Diff line change 6565 - name : Validate samples
6666 if : ${{ env.STACKS != '' }}
6767 run : STACKS_DIR=$(pwd)/samples/.cache bash tests/validate_devfile_schemas.sh --samples
68+
69+ non-terminating :
70+ name : check for non-terminating images
71+ runs-on : ubuntu-latest
72+ steps :
73+ - name : Checkout
74+ uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
75+ with :
76+ fetch-depth : 0
77+
78+ - name : Install yq
79+ run : curl -sL -O https://github.com/mikefarah/yq/releases/download/${{ env.YQ_VERSION }}/yq_linux_amd64 -o /usr/local/bin/yq && mv ./yq_linux_amd64 /usr/local/bin/yq && chmod +x /usr/local/bin/yq
80+
81+ - name : Test delta if on a pull request
82+ if : ${{ github.event_name == 'pull_request' }}
83+ run : echo "TEST_DELTA=true" >> $GITHUB_ENV
84+
85+ - name : Build parents file and get child samples
86+ run : echo "STACKS=$(bash tests/build_parents_file.sh)" >> $GITHUB_ENV
87+
88+ - name : Setup Minikube
89+ if : ${{ env.STACKS != '' }}
90+ uses : manusa/actions-setup-minikube@92af4db914ab207f837251cd53eb7060e6477614 # v2.11.0
91+ with :
92+ minikube version : ${{ env.MINIKUBE_VERSION }}
93+ kubernetes version : ${{ env.KUBERNETES_VERSION }}
94+ driver : " docker"
95+ github token : ${{ secrets.GITHUB_TOKEN }}
96+ start args : " --addons=ingress ${{ env.MINIKUBE_RESOURCES }}"
97+
98+ - name : Check that containers components are non terminating
99+ if : ${{ env.STACKS != '' }}
100+ run : bash tests/check_non_terminating.sh
Original file line number Diff line number Diff line change 11#! /bin/bash
2+
3+ POSITIONAL_ARGS=()
4+ SAMPLES=" false"
5+
6+ while [[ $# -gt 0 ]]; do
7+ case $1 in
8+ -s|--samples)
9+ SAMPLES=" true"
10+ shift # past argument
11+ ;;
12+ -* |--* )
13+ echo " Unknown option $1 "
14+ exit 1
15+ ;;
16+ * )
17+ POSITIONAL_ARGS+=(" $1 " ) # save positional arg
18+ shift # past argument
19+ ;;
20+ esac
21+ done
22+
23+ set -- " ${POSITIONAL_ARGS[@]} " # restore positional parameters
224set -o nounset
325set -o errexit
426
5- DEVFILES_DIR=" $( pwd) /stacks"
27+ DEVFILES_DIR=${STACKS_DIR :- " $( pwd) /stacks" }
628
729# The stacks to test as a string separated by spaces
8- STACKS=$( bash " $( pwd) /tests/get_stacks.sh" )
30+ STACKS=${STACKS :- " $ ( bash " $( pwd) /tests/get_stacks.sh" ) " }
931
1032replaceVariables () {
1133 image=$1
@@ -124,6 +146,13 @@ isNonTerminating() {
124146YQ_PATH=${YQ_PATH:- yq}
125147TEST_NAMESPACE=${TEST_NAMESPACE:- default}
126148
149+ # Unzip resource files if samples
150+ if [ " ${SAMPLES} " == " true" ]; then
151+ for sample_dir in $( ls $DEVFILES_DIR ) ; do
152+ unzip -n $DEVFILES_DIR /$sample_dir /sampleName.zip -d $DEVFILES_DIR
153+ done
154+ fi
155+
127156if [ -z " ${ENV:- } " ]; then
128157 ENV=minikube
129158fi
You can’t perform that action at this time.
0 commit comments