Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Aug 29, 2023
1 parent 48052e6 commit acbb29f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 73 deletions.
77 changes: 5 additions & 72 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,78 +88,6 @@ jobs:
run: |
./hack/e2e-test.sh e2e/kwok/${{ matrix.case }}
test-kwokctl-e2e:
strategy:
fail-fast: false
matrix:
include:
# Windows
# Linux containers are not supported on Windows Runner
# https://github.com/orgs/community/discussions/25491#discussioncomment-3248089
- os: windows-latest
kwokctl-runtime: binary

# MacOS
- os: macos-latest
kwokctl-runtime: binary
- os: macos-latest
kwokctl-runtime: docker

# Linux
- os: ubuntu-latest
kwokctl-runtime: binary
- os: ubuntu-latest
kwokctl-runtime: docker
- os: ubuntu-latest
kwokctl-runtime: podman

continue-on-error: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"

# No binary is provided by default for control plane components outside of Linux
# https://www.downloadkubernetes.com
- name: Download Kubernetes Source Code
uses: actions/checkout@v3
if: ${{ matrix.kwokctl-runtime == 'binary' && ( matrix.os == 'macos-latest' || matrix.os == 'windows-latest' ) }}
with:
repository: kubernetes/kubernetes
path: kubernetes
ref: v1.28.0
- name: Build Kubernetes Binary for Windows
if: ${{ matrix.kwokctl-runtime == 'binary' && matrix.os == 'windows-latest' }}
shell: bash
run: |
export GOBIN="$(go env GOPATH)/bin"
cd "${GITHUB_WORKSPACE}/kubernetes" && go install ./cmd/{kube-apiserver,kube-controller-manager,kube-scheduler}
mkdir -p "${GITHUB_WORKSPACE//\\//}/workdir" && cat >"${GITHUB_WORKSPACE//\\//}/workdir/kwok.yaml" << EOF
kind: KwokctlConfiguration
apiVersion: config.kwok.x-k8s.io/v1alpha1
options:
kubeBinaryPrefix: "${GOBIN//\\//}"
EOF
- name: Build Kubernetes Binary for MacOS
if: ${{ matrix.kwokctl-runtime == 'binary' && matrix.os == 'macos-latest' }}
shell: bash
run: |
cd "${GITHUB_WORKSPACE}/kubernetes" && make WHAT="cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-scheduler"
mkdir -p "${GITHUB_WORKSPACE}/workdir" && cat >"${GITHUB_WORKSPACE}/workdir/kwok.yaml" << EOF
kind: KwokctlConfiguration
apiVersion: config.kwok.x-k8s.io/v1alpha1
options:
kubeBinaryPrefix: "${GITHUB_WORKSPACE}/kubernetes/_output/bin"
EOF
- name: Test Workable
shell: bash
run: |
./hack/e2e-test.sh e2e/kwokctl/${{ matrix.kwokctl-runtime }}
test-kwok:
strategy:
fail-fast: false
Expand Down Expand Up @@ -355,6 +283,11 @@ jobs:
run: |
./hack/e2e-test.sh kwokctl/kwokctl_with_dryrun
- name: Test e2e
shell: bash
run: |
./hack/e2e-test.sh e2e/kwokctl/${{ matrix.kwokctl-runtime }}
- name: Test Export Logs
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion hack/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function main() {
echo "================================================================================"
if [[ "${target}" == "e2e/"* ]]; then
echo "Testing ${target}..."
if ! go test -v "sigs.k8s.io/kwok/test/${target}" -args --v=8; then
if ! go test -v "sigs.k8s.io/kwok/test/${target}" -args --v=6; then
failed+=("${target}")
echo "------------------------------"
echo "Test ${target} failed."
Expand Down

0 comments on commit acbb29f

Please sign in to comment.