-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 1.8 KB
/
e2e.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI E2E
on:
push:
tags:
- v*
branches:
- main
pull_request:
branches:
- 'main'
defaults:
run:
shell: bash
jobs:
e2e-ci:
runs-on: ubuntu-latest
env:
MIXED_CPUS_CONTAINER_IMAGE: quay.io/titzhak/mixedcpus:ci
RUNTIME: docker
E2E_SHARED_CPUS: 0
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup golang
uses: actions/setup-go@v2
id: go
with:
go-version: 1.20.3
- name: show tool versions
run: |
go version
kind version
- name: run unit-tests
run: |
make test-unit
- name: build test binary
run: |
make build-e2e
- name: build image
run: |
MIXED_CPUS_CONTAINER_IMAGE=${MIXED_CPUS_CONTAINER_IMAGE} RUNTIME=${RUNTIME} make image
- name: create K8S kind cluster
run: |
# kind is part of 20.04 image, see: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
# kind image used for this setup is under the config.yaml file
kind create cluster --config=test/kind/config.yaml
kind load docker-image ${MIXED_CPUS_CONTAINER_IMAGE}
- name: label workers
run: |
kubectl label node kind-worker kind-worker2 node-role.kubernetes.io/worker=""
- name: deploy mixed-cpus plugin
run: |
make deploy
- name: wait for daemonset to be ready
run: |
make e2e-wait-for-ds
- name: setup-info
run: |
kubectl describe -l app=mixedcpus-plugin daemonsets || :
kubectl describe nodes || :
- name: run e2e test
run: |
make test-e2e