forked from sustainable-computing-io/kepler
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (84 loc) · 2.46 KB
/
integration_test.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Integration test
on:
pull_request:
paths-ignore:
- 'doc/**'
- 'enhancements/**'
env:
GO_VERSION: "1.18"
OUTPUT_DIR: "_output/"
FILE_NAME: "kepler.tar.gz"
jobs:
build-kepler:
runs-on: ubuntu-20.04
steps:
- name: checkout source
uses: actions/checkout@v3
- name: install Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GO_VERSION}}
- name: build manifest
run: make build-manifest OPTS="CI_DEPLOY"
- name: build and export Kepler image
run: |
make build_containerized
make save-image
env:
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker
IMAGE_OUTPUT_PATH: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}}
- name: save Kepler image as artifact
uses: actions/upload-artifact@v3
with:
name: kepler
path: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}}
integration_test:
needs: [build-kepler]
runs-on: ubuntu-20.04
strategy:
matrix:
cluster_provider: [kind,microshift]
steps:
- name: checkout source
uses: actions/checkout@v3
- name: download Kepler image artifact
uses: actions/download-artifact@v3
with:
name: kepler
- name: build manifest
run: make build-manifest OPTS="CI_DEPLOY"
- name: import Kepler image
run: make load-image
env:
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker
INPUT_PATH: ${{env.FILE_NAME}}
- name: use Kepler action to deploy cluster
uses: sustainable-computing-io/kepler-action@v0.0.0
with:
runningBranch: ${{matrix.cluster_provider}}
local_dev_cluster_version: main
cluster_provider: ${{matrix.cluster_provider}}
- name: push Kepler image to load registry
run: |
make push-image
make image-prune
env:
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker
- name: deploy Kepler on cluster
run: make cluster-deploy
env:
CLUSTER_PROVIDER: ${{matrix.cluster_provider}}
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker
- name: run e2e tests
run: make e2e
env:
CLUSTER_PROVIDER: ${{matrix.cluster_provider}}
kepler_address: localhost:9102