diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99a125c5c..7d01a6290 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,3 +78,10 @@ jobs: fetch-depth: 0 - name: Run e2e test run: ./test/test.sh + + - name: Upload logs + uses: actions/upload-artifact@v3 + if: failure() + with: + name: e2e-logs-${{ github.run_id }} + path: ${{ github.workspace }}/test/logs-* diff --git a/test/environments/default.env.sh b/test/environments/default.env.sh index 9ff07e815..b944ea002 100755 --- a/test/environments/default.env.sh +++ b/test/environments/default.env.sh @@ -25,6 +25,7 @@ create_data_plane data-v1-23 v1.23.4 || { echo "Failed to create data plane" exit 1 } + "${ROOT}/hack/gen-clusterconfigs.sh" "${cases}" diff --git a/test/environments/multiple.env.sh b/test/environments/multiple.env.sh index 3289e4fd4..9cd8ae857 100755 --- a/test/environments/multiple.env.sh +++ b/test/environments/multiple.env.sh @@ -11,17 +11,18 @@ cases="${1}" source "$(dirname "${BASH_SOURCE[0]}")/../helper.sh" releases=( - v1.23.5 - v1.22.8 - v1.21.11 + v1.28.2 + v1.27.6 + v1.26.9 + v1.25.14 + v1.24.15 + v1.23.17 + v1.22.17 + v1.21.14 v1.20.15 - v1.19.16 v1.18.20 - v1.17.17 v1.16.15 - v1.15.12 v1.14.10 - v1.13.12 v1.12.10 v1.11.10 v1.10.13 @@ -46,6 +47,7 @@ for release in "${releases[@]}"; do exit 1 } done + "${ROOT}/hack/gen-clusterconfigs.sh" "${cases}" diff --git a/test/helper.sh b/test/helper.sh index ea84b6d0d..abdab3c84 100755 --- a/test/helper.sh +++ b/test/helper.sh @@ -60,6 +60,7 @@ function create_cluster() { # delete the kind cluster function delete_cluster() { local name="${1:-kind}" + kind export logs --name "${name}" "${ROOT}/test/logs/kind/${name}" kind delete cluster --name "${name}" } @@ -127,7 +128,7 @@ function install_kwokctl() { if cmd_exist kwokctl; then return 0 fi - wget "https://github.com/kubernetes-sigs/kwok/releases/download/v0.1.0/kwokctl-$(go env GOOS)-$(go env GOARCH)" -O "/usr/local/bin/kwokctl" && + wget "https://github.com/kubernetes-sigs/kwok/releases/download/v0.4.0/kwokctl-$(go env GOOS)-$(go env GOARCH)" -O "/usr/local/bin/kwokctl" && chmod +x "/usr/local/bin/kwokctl" } @@ -150,38 +151,27 @@ function create_data_plane() { local name="${1}" local version="${2:-v1.19.16}" local kubeconfig - local pedia_cluster local ip install_kwokctl - KWOK_KUBE_VERSION="${version}" kwokctl create cluster --name "${name}" --quiet-pull ip="$(host_docker_internal)" + kwokctl create cluster --name "${name}" --wait 120s --kubeconfig "" --config - <