-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (49 loc) · 1.46 KB
/
e2e_loader.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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