forked from RamenDR/ramen
-
Notifications
You must be signed in to change notification settings - Fork 0
190 lines (154 loc) · 4.51 KB
/
tools.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0
# yamllint disable rule:line-length
---
name: tools
# This workflow will run when developer push a topic branch to their
# fork in github, minimizing noise for maintainers. This
# workflow also runs on nightly basis at 12:00 AM (00:00 UTC)
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
defaults:
run:
shell: bash
jobs:
drenv-linux:
name: drenv
strategy:
matrix:
os:
- ubuntu-22.04
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14-dev"
runs-on: ${{ matrix.os }}
env:
DRIVER: "container"
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install minikube
run: |
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube version
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install ./kubectl /usr/local/bin/
kubectl version --client --output=yaml
- name: Install tools
run: pip install -r requirements.txt
- name: Enable coverage for child processes
run: cp coverage.pth $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')
- name: Install drenv
run: pip install -e test
- name: Run flake8
run: make flake8
working-directory: test
- name: Run pylint
run: make pylint
working-directory: test
- name: Run black
run: make black
working-directory: test
- name: Start test cluster
run: make cluster
working-directory: test
- name: Run tests
run: make test
working-directory: test
- name: Report test coverage
run: make coverage
working-directory: test
- name: Clean up
run: make clean
working-directory: test
drenv-macos:
name: drenv
strategy:
matrix:
os:
# arm64, 3 cpus (M1), 7 GiB RAM, no nested virtalization.
- macos-14
python-version:
- "3.13"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout ramen
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Homebrew packages
run: brew install kubectl
- name: Install python packages
run: pip install -r requirements.txt
- name: Enable coverage for child processes
run: cp coverage.pth $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')
- name: Install drenv
run: pip install -e test
- name: Run flake8
run: make flake8
working-directory: test
- name: Run pylint
run: make pylint
working-directory: test
- name: Run black
run: make black
working-directory: test
- name: Run tests
# We cannot run the test cluster on macOS.
run: make unit-test
working-directory: test
- name: Report test coverage
run: make coverage
working-directory: test
ramenctl:
name: ramenctl
strategy:
matrix:
os:
- ubuntu-22.04
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14-dev"
include:
# arm64, 3 cpus (M1), 7 GiB RAM, no nested virtalization.
- os: macos-14
python-version: "3.13"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install python packages
run: pip install -r requirements.txt
- name: Install drenv
run: pip install -e test
- name: Run flake8
run: make flake8
working-directory: ramenctl
- name: Run pylint
run: make pylint
working-directory: ramenctl
- name: Run black
run: make black
working-directory: ramenctl