-
Notifications
You must be signed in to change notification settings - Fork 78
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
6 changed files
with
106 additions
and
28 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 |
---|---|---|
|
@@ -7,8 +7,8 @@ on: | |
branches: | ||
- main | ||
jobs: | ||
e2e: | ||
name: e2e test | ||
e2e-linux: | ||
name: e2e test on linux | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: checkout code | ||
|
@@ -22,4 +22,33 @@ jobs: | |
- name: Setup K3d | ||
uses: nolar/[email protected] | ||
- name: run e2e | ||
run: make e2e-test | ||
run: make e2e-test OSTYPE=linux | ||
|
||
e2e-windows: | ||
name: e2e test on windows | ||
runs-on: windows-latest | ||
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: install K3d | ||
shell: powershell | ||
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 | ||
uses: knicknic/temp-kubernetes-ci@v1 | ||
- name: run e2e | ||
run: | | ||
# Add kusion binary path into the user executable path. | ||
set path=%path%;D:\a\kusion\kusion\bin | ||
make e2e-test OSTYPE=windows |
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
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 |
---|---|---|
|
@@ -3,16 +3,23 @@ | |
# Usage: hack/run-e2e.sh | ||
# Example 1: hack/run-e2e.sh (run e2e test) | ||
|
||
# Get the OS type. | ||
OSTYPE=$1 | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# Install ginkgo | ||
GO111MODULE=on go install github.com/onsi/ginkgo/v2/[email protected] | ||
|
||
# Build kusion binary | ||
# Build kusion binary according to the OS type. | ||
go generate ./pkg/version | ||
go build -o bin/kusion . | ||
if [ $OSTYPE == "windows" ]; then | ||
go build -o bin/kusion.exe . | ||
else | ||
go build -o bin/kusion . | ||
fi | ||
|
||
|
||
# Run e2e | ||
|
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