-
Notifications
You must be signed in to change notification settings - Fork 52
124 lines (116 loc) · 5.24 KB
/
ci.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# -------------------------------------------------------------------------- #
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
OPENNEBULA_ENDPOINT: "http://localhost:2633/RPC2"
OPENNEBULA_USERNAME: "oneadmin"
OPENNEBULA_PASSWORD: "opennebula"
OPENNEBULA_FLOW_ENDPOINT: "http://localhost:2474"
TF_ACC: 1
jobs:
lint-Go_Formating:
name: Go formating
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: "Install Go dependencies"
run: go install
- name: "Test Go formating"
run: bash ${{ github.workspace }}/.github/scripts/lint.sh
test-6_8:
name: "Test OpenNebula 6.8"
runs-on: ubuntu-22.04
needs: [lint-Go_Formating]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.18
- run: wget -q -O- https://downloads.opennebula.io/repo/repo2.key | sudo apt-key add -
- run: sudo sh -c 'echo "deb https://downloads.opennebula.io/repo/6.8/Ubuntu/22.04 stable opennebula" > /etc/apt/sources.list.d/opennebula.list'
- run: sudo apt-get -y update
- run: sudo apt-get -y install opennebula opennebula-flow opennebula-node-lxc # opennebula-node-lxc to ensure node dependencies for monitoring are installed
- run: source ${{ github.workspace }}/.github/scripts/oned.sh
- run: go install
- run: go test $(go list ./... | grep -v 'vendor') -v ${TESTARGS} -timeout 120m
test-6_6:
name: "Test OpenNebula 6.6"
runs-on: ubuntu-22.04
needs: [lint-Go_Formating]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.18
- run: wget -q -O- https://downloads.opennebula.io/repo/repo2.key | sudo apt-key add -
- run: sudo sh -c 'echo "deb https://downloads.opennebula.io/repo/6.6/Ubuntu/22.04 stable opennebula" > /etc/apt/sources.list.d/opennebula.list'
- run: sudo apt-get -y update
- run: sudo apt-get -y install opennebula opennebula-flow opennebula-node-lxc # opennebula-node-lxc to ensure node dependencies for monitoring are installed
- run: source ${{ github.workspace }}/.github/scripts/oned.sh
- run: go install
- run: go test $(go list ./... | grep -v 'vendor') -v ${TESTARGS} -timeout 120m
test-6_4:
name: "Test OpenNebula 6.4"
runs-on: ubuntu-20.04
needs: [lint-Go_Formating]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.18
- run: wget -q -O- https://downloads.opennebula.io/repo/repo2.key | sudo apt-key add -
- run: sudo sh -c 'echo "deb https://downloads.opennebula.io/repo/6.4/Ubuntu/20.04 stable opennebula" > /etc/apt/sources.list.d/opennebula.list'
- run: sudo apt-get -y update
- run: sudo apt-get -y install opennebula opennebula-flow opennebula-node-lxc # opennebula-node-lxc to ensure node dependencies for monitoring are installed
- run: source ${{ github.workspace }}/.github/scripts/oned.sh
- run: go install
- run: go test $(go list ./... | grep -v 'vendor') -v ${TESTARGS} -timeout 120m
test-5_12:
name: "Test OpenNebula 5.12"
runs-on: ubuntu-20.04
needs: [lint-Go_Formating]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.18
- run: wget -q -O- https://downloads.opennebula.io/repo/repo.key | sudo apt-key add -
- run: sudo sh -c 'echo "deb https://downloads.opennebula.io/repo/5.12/Ubuntu/20.04 stable opennebula" > /etc/apt/sources.list.d/opennebula.list'
- run: sudo apt-get -y update
- run: sudo apt-get -y install opennebula opennebula-flow
- run: source ${{ github.workspace }}/.github/scripts/oned.sh
- run: go install
- run: go test $(go list ./... | grep -v 'vendor') -v ${TESTARGS} -timeout 120m