Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:

strategy:
fail-fast: false
max-parallel: 1
matrix:
include: "${{ fromJson(needs.test-matrix.outputs.tests) }}"

Expand Down Expand Up @@ -175,6 +176,10 @@ jobs:
- name: Stagger tests
run: 'sleep $((RANDOM % 60 + 1))'

- name: Cleanup Leftovers
if: always()
run: helpers/cleanup

- name: Create Test Cluster
run: helpers/run-in-test-cluster

Expand Down
6 changes: 3 additions & 3 deletions helpers/cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set -euo pipefail

export CLUSTER_PREFIX="${CLUSTER_PREFIX-k8test}"

if ! test -f k8test/cluster/inventory.yml; then
exit 0
fi
# Make sure the k8test/helpers/release-set CLI is available
source helpers/run-in-test-cluster
ensure-k8test > /dev/null

k8test/playbooks/destroy-cluster.yml \
-i k8test/cluster/inventory.yml \
Expand Down
7 changes: 6 additions & 1 deletion helpers/run-in-test-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ function ensure-k8test() {
# on the runners and cloning via SSH does not work.
#
# Therefore we run a separate install block that is only meant for GitHub.
if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then
if [[ "${GITHUB_ACTIONS:-}" == "true" ]] then
if test -d k8test; then
source k8test/venv/bin/activate
return
fi

mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts
git clone https://github.com/cloudscale-ch/k8test
python3 -m venv k8test/venv
Expand Down
Loading