diff --git a/.github/workflows/cli.yaml b/.github/workflows/cli.yaml index 17b38b3a768a..3006938b02ca 100644 --- a/.github/workflows/cli.yaml +++ b/.github/workflows/cli.yaml @@ -34,9 +34,6 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.mod - - uses: helm/kind-action@v1.9.0 - with: - version: "v0.20.0" - name: run karmadactl init test run: | export CLUSTER_VERSION=kindest/node:${{ matrix.k8s }} @@ -48,11 +45,20 @@ jobs: export KUBECONFIG=${HOME}/karmada/karmada-apiserver.config GO111MODULE=on go install github.com/onsi/ginkgo/v2/ginkgo ginkgo -v --race --trace -p --focus="[BasicPropagation] propagation testing deployment propagation testing" ./test/e2e/ - - uses: chainguard-dev/actions/kind-diag@main - # Only upload logs on failure. - if: ${{ failure() }} + - name: export logs + if: always() + run: | + export ARTIFACTS_PATH=${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/ + mkdir -p $ARTIFACTS_PATH + + mkdir -p $ARTIFACTS_PATH/{karmada-host,member1,member2} + kind export logs --name=karmada-host $ARTIFACTS_PATH/karmada-host + kind export logs --name=member1 $ARTIFACTS_PATH/member1 + kind export logs --name=member2 $ARTIFACTS_PATH/member2 + - name: upload logs + if: always() + uses: actions/upload-artifact@v3 with: - cluster-resources: nodes,namespaces, - namespace-resources: configmaps,pods,svc - artifact-name: logs-${{ matrix.k8s}} + name: karmadactl_test_logs_${{ matrix.k8s }} + path: ${{ github.workspace }}/karmadactl-test-logs/${{ matrix.k8s }}/