-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (49 loc) · 1.41 KB
/
ci-test-ginkgo.yml
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
58
59
60
name: ci-test-ginkgo
on:
push:
branches: [main]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/ci-test-ginkgo.yml"
pull_request:
branches: [main]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/ci-test-ginkgo.yml"
jobs:
build:
name: Auto-testing Framework
runs-on: ubuntu-latest
env:
RUNTIME: containerd
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "v1.20"
- name: Create k3s cluster
run: ./.github/workflows/scripts/install_k3s.sh
- name: Test connectivity
run: kubectl get pods -A
- name: Deploy wordpress-mysql
run: |
kubectl apply -f ./tests/res/wordpress-mysql-dep.yaml
kubectl wait --for=condition=ready --timeout=15m -n wordpress-mysql pod -l app=wordpress
- name: Building k8tls
run: make build
- name: Deploy k8tls
run: |
docker save kubearmor/k8tls:latest | sudo k3s ctr images import -
kubectl apply -f ./tests/res/test-k8tls.yaml
sleep 10
- name: Check k8tls is completed
run: kubectl get pods -A
- name: Test k8tls using Ginkgo
run: |
# mkdir /tmp/k8tls
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
make
working-directory: ./tests
timeout-minutes: 30