-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (82 loc) · 2.82 KB
/
test-mock.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
name: "Test Functionality of the Mock cli"
on:
pull_request:
paths:
- 'cli/**'
- 'scripts/**'
- 'go.mod'
- 'go.sum'
types: [ labeled ]
branches: [ main ]
push:
paths:
- 'scripts/**'
- 'cli/**'
- '.github/workflows/test-mock.yml'
- 'go.mod'
- 'go.sum'
branches: [ main ]
jobs:
ksctl-cli-linux:
if: ${{ github.event.label.name == 'pr/lgtm' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
env:
KSCTL_FAKE_FLAG_ENABLED: "1"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.0
- name: build ksctl
run: |
make install_linux
ksctl version
- name: civo create
run: |
ksctl create civo -n demo -r LON1 --nodeSizeMP "g4s.kube.small" -v --approve
ksctl create ha-civo -n ha-demo --nodeSizeDS "fake.small" --nodeSizeLB "fake.small" --nodeSizeCP "fake.small" --nodeSizeWP "fake.small" -r LON1 -v --approve
- name: azure create
run: |
ksctl create azure -n demo -r fake --nodeSizeMP "fake" -v --approve
ksctl create ha-azure -n ha-demo --nodeSizeDS "fake" --nodeSizeLB "fake" --nodeSizeCP "fake" --nodeSizeWP "fake" -r fake -v --approve
- name: local create
run: |
ksctl create local -n demolocal -v --approve
- name: civo get
run: |
ksctl get -p civo
- name: azure get
run: |
ksctl get -p azure
- name: all
run: |
ksctl get
- name: civo switch
run: |
ksctl switch -p civo -n demo -r LON1
ksctl switch -p ha-civo -n ha-demo -r LON1
- name: azure switch
run: |
ksctl switch -p azure -n demo -r fake
ksctl switch -p ha-azure -n ha-demo -r fake
- name: civo scale up and down
run: |
ksctl delete ha-civo delete-nodes -n ha-demo --noWP 0 -r LON1 --approve -v
ksctl create ha-civo add-nodes -n ha-demo --noWP 1 --nodeSizeWP "fake.small" -r LON1 -v --approve
- name: azure scale up and down
run: |
ksctl delete ha-azure delete-nodes -n ha-demo --noWP 0 -r fake --approve -v
ksctl create ha-azure add-nodes -n ha-demo --noWP 1 --nodeSizeWP "fake" -r fake -v --approve
- name: civo delete
run: |
ksctl delete civo -n demo -r LON1 -v --approve
ksctl delete ha-civo -n ha-demo -r LON1 -v --approve
- name: azure delete
run: |
ksctl delete azure -n demo -r fake -v --approve
ksctl delete ha-azure -n ha-demo -r fake -v --approve
- name: local delete
run: |
ksctl delete local -n demolocal -v --approve