forked from KusionStack/kusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,58 @@ name: e2e test | |
on: | ||
push: | ||
branches: | ||
- main | ||
- ks-main | ||
pull_request: | ||
branches: | ||
- main | ||
- ks-main | ||
jobs: | ||
e2e: | ||
name: e2e test | ||
runs-on: ubuntu-20.04 | ||
# e2e: | ||
# name: e2e test | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: checkout code | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: install Go | ||
# uses: actions/setup-go@v2 | ||
# with: | ||
# go-version: 1.22 | ||
# - name: Setup K3d | ||
# uses: nolar/[email protected] | ||
# - name: run e2e | ||
# run: make e2e-test | ||
e2e-windows: | ||
name: e2e test on windows | ||
runs-on: windows-2019 | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
with: | ||
go-version: 1.22 | ||
- name: Setup K3d | ||
uses: nolar/[email protected] | ||
- name: run e2e | ||
shell: powershell | ||
# uses: nolar/[email protected] | ||
run: | | ||
# Install scoop. | ||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | ||
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | ||
# Install K3d. | ||
scoop install k3d | ||
- name: Setup K3s with temp-kubernetes-ci | ||
uses: knicknic/temp-kubernetes-ci@v1 | ||
|
||
- name: Check K3s cluster | ||
shell: powershell | ||
run: | | ||
kubectl config get-contexts | ||
kubectl get nodes | ||
- name: Run e2e | ||
run: make e2e-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,18 @@ set -o pipefail | |
# Install ginkgo | ||
GO111MODULE=on go install github.com/onsi/ginkgo/v2/[email protected] | ||
|
||
# Build kusion binary | ||
go generate ./pkg/version | ||
go build -o bin/kusion . | ||
|
||
# Check OS type. | ||
os=${OSTYPE//[0-9.]/} | ||
|
||
if [[ $os == "windows" ]]; then | ||
# Build kusion binary on Windows | ||
go generate ./pkg/version | ||
go build -o bin/kusion.exe . | ||
else | ||
# Build kusion binary on Linux | ||
go generate ./pkg/version | ||
go build -o bin/kusion . | ||
fi | ||
|
||
# Run e2e | ||
set +e | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters