Feature/multi loader #15
Workflow file for this run
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
name: End-to-End Loader Test | |
on: | |
schedule: | |
- cron: "0 9 * * 1" | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
GOOS: linux | |
GO111MODULE: on | |
jobs: | |
test-knative: | |
name: Test Knative Deployment | |
env: | |
KIND_VERSION: v0.22.0 | |
K8S_VERSION: v1.29 | |
YAML_DIR: workloads/container | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
service: | |
[ | |
trace_func_go, | |
] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Kubernetes KinD Cluster and install Knative | |
uses: ./.github/actions/ci_knative_setup | |
- name: Build and run loader | |
run: go run cmd/loader.go --config pkg/config/test_config.json | |
- name: Check the output | |
run: test -f "data/out/experiment_duration_5.csv" && test $(grep true data/out/experiment_duration_5.csv | wc -l) -eq 0 # test the output file for errors (true means failure to invoke) | |
- name: Print logs | |
if: ${{ always() }} | |
run: | | |
set -x | |
container_list=$(kubectl get pods -n default -o jsonpath="{.items[*].spec.containers[*].name}") | |
for container_name in $container_list | |
do | |
kubectl logs -n default -c $container_name -l serving.knative.dev/service=${{ matrix.service }} | |
done | |
- name: Down | |
if: ${{ always() }} | |
run: | | |
kn service delete --all |