-
Notifications
You must be signed in to change notification settings - Fork 23
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
2 changed files
with
90 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Profiler test of the cluster load generator | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 9 * * 1" | ||
push: | ||
branches: [main] | ||
paths: | ||
- "utils/**" | ||
- "tools/**" | ||
|
||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "utils/**" | ||
- "tools/**" | ||
|
||
env: | ||
GOOS: linux | ||
GO111MODULE: on | ||
PORT: 50051 | ||
PLATFORMS: linux/amd64,linux/arm64 | ||
|
||
jobs: | ||
test-knative: | ||
name: Test Knative Deployment | ||
needs: build-and-push | ||
env: | ||
KIND_VERSION: v0.14.0 | ||
K8S_VERSION: v1.23 | ||
|
||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: "true" | ||
- name: Checkout LFS objects | ||
run: git lfs checkout | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' # caching pip dependencies | ||
# - run: pip install -r ./tools/profiler/requirements.txt | ||
|
||
# Install kn | ||
- uses: supplypike/setup-bin@v3 | ||
with: | ||
uri: 'https://github.com/knative/client/releases/download/knative-v1.13.0/kn-linux-amd64' | ||
name: 'kn' | ||
version: '1.13.0' | ||
|
||
## Setup a Knative cluster to test the service | ||
- name: Create k8s Kind Cluster | ||
run: bash ./runner/scripts/01-kind.sh | ||
|
||
- name: Install Serving | ||
run: bash ./runner/scripts/02-serving.sh | ||
|
||
- name: Install Kourier | ||
run: bash ./runner/scripts/02-kourier.sh | ||
|
||
- name: Test profiler on one function | ||
working-directory: ./tools/profiler | ||
run: python main.py profile --config test-config.json -dbg True | ||
|
||
- name: Show results | ||
working-directory: ./tools/profiler | ||
run: | | ||
cat profile.json | ||
cat build/kn-aes-go/cpu.txt | ||
cat build/kn-aes-go/memory.txt | ||
cat build/kn-aes-go/duration.txt | ||
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"yaml-location": "./yamls/kn-aes-go.yaml", | ||
"predeployment-commands": [], | ||
"postdeployment-commands": [] | ||
} | ||
] |