-
Notifications
You must be signed in to change notification settings - Fork 275
253 lines (201 loc) · 7.53 KB
/
main.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
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
name: main
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check:
# runs-on: ubuntu-20.04 # means github.com
runs-on: [self-hosted, linux, X64] # means matterhorn
steps:
- uses: actions/checkout@v2
# must be skipped on self-hosted build slaves (eg matterhorn)
#
# - name: Install OS package dependencies
# run: |
# sudo apt update
# sudo apt install libenchant-dev
# sudo apt install libbz2-dev
# sudo apt install libsnappy-dev
# sudo apt install libunwind-dev
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
- name: Install Python package dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run Flake8
run: tox -c tox.ini -e flake8
- name: Run Yapf
run: tox -c tox.ini -e yapf
- name: Run MyPy
run: tox -c tox.ini -e mypy
- name: Run Bandit
run: tox -c tox.ini -e bandit
# FIXME
# - name: Run Coverage
# run: tox -c tox.ini -e coverage
docs:
# runs-on: ubuntu-20.04 # means github.com
runs-on: [self-hosted, linux, X64] # means matterhorn
steps:
- uses: actions/checkout@v2
# must be skipped on self-hosted build slaves (eg matterhorn)
#
# - name: Install OS package dependencies
# run: |
# sudo apt update
# sudo apt install libenchant-dev
# sudo apt install libbz2-dev
# sudo apt install libsnappy-dev
# sudo apt install libunwind-dev
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
- name: Install Python package dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run Sphinx
run: tox -c tox.ini -e sphinx
test-amd64:
# runs-on: ubuntu-20.04 # means github.com
runs-on: [self-hosted, linux, X64] # means matterhorn
env:
CB_FULLTESTS: 1
# Test on CPython 3.7 & 3.10 + PyPy 3.8
strategy:
matrix:
# https://github.com/actions/setup-python#specifying-a-pypy-version
python-version: ['3.7', '3.10', 'pypy-3.8']
# https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error
continue-on-error: false
steps:
# Checkout sources
- uses: actions/checkout@v2
# must be skipped on self-hosted build slaves (eg matterhorn)
#
# Install OS packages, as we install Python packages from source:
# libenchant-dev: needed for pyenchant, needed for sphinx-spellcheck
# libbz2-dev, libsnappy-dev: needed for compression
# libunwind-dev: needed for vmprof
# - name: Install OS package dependencies
# run: |
# sudo apt update
# sudo apt install build-essential libssl-dev libffi-dev libunwind-dev \
# libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \
# libsnappy-dev
# Use this Python
# https://github.com/actions/setup-python/blob/main/README.md
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python package dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
# pip install -r requirements-min.txt
- name: Install Crossbar.io package dependencies & Crossbar.io
run: |
pip install -U -r requirements-latest.txt
pip install .
- name: Display Crossbar.io version
run: |
python -c "import crossbar; print(crossbar.__version__)"
crossbar version
- name: Run Python import tests
run: |
python ./test/test_imports.py
- name: Run unit tests (Twisted Trial)
run: |
python -m twisted.trial crossbar
- name: Run integration tests (Autobahn|Python Client)
run: |
./test/test_ab_examples.sh
# FIXME
# - name: Run management API test client
# run: |
# ./test/management/run.sh
# - name: Run command line tests (Crossbar.io CLI) 0
# run: |
# ./test/test_cli.sh
# - name: Run command line tests (Crossbar.io CLI) 1
# run: |
# ./test/test_cli_1.sh
# - name: Run command line tests (Crossbar.io CLI) 2
# run: |
# ./test/test_cli_2.sh
# - name: Run command line tests (Crossbar.io CLI) 3
# run: |
# ./test/test_cli_3.sh
# - name: Run CLI-based cluster automation tests 1
# run: |
# cd ./test/test_automated && ./test_prepare_host.sh && ./test_setup1.sh && ./test_host1.sh 1
# - name: Run CLI-based cluster automation tests 2
# run: |
# cd ./test/test_automated && ./test_prepare_host.sh && ./test_setup2.sh && ./test_host2.sh 1
# - name: Run XBR CLI tests
# run: |
# cd ./test/test_xbr_network && ./test_xbr_network.sh 1
# FIXME: https://github.com/crossbario/crossbar/issues/1842
#
# test-arm64:
# env:
# CB_FULLTESTS: 1
# # https://github.blog/changelog/2019-12-03-github-actions-self-hosted-runners-on-arm-architectures/
# # https://medium.com/@nabil.servais/using-github-actions-to-test-your-go-code-on-arm64-ce581e646cb
# runs-on: [self-hosted, linux, ARM64]
# strategy:
# matrix:
# # https://github.com/actions/setup-python#specifying-a-pypy-version
# # https://downloads.python.org/pypy/versions.json
# python-version: ['3.x', 'pypy-3.7-nightly']
# # https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/
# # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error
# continue-on-error: false
# steps:
# # Checkout sources
# - uses: actions/checkout@v2
# # Use this Python
# # https://github.com/marketplace/actions/setup-python
# # https://github.com/actions/setup-python/blob/main/README.md
# # https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python#specifying-a-python-version
# # https://github.com/actions/setup-python/issues/45
# # https://github.com/sqlalchemy/sqlalchemy/blob/master/.github/workflows/create-wheels.yaml
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# architecture: aarch64
# - name: Install Python package dependencies
# run: |
# python -V
# python -m ensurepip
# python -m pip install -r requirements-dev.txt
# - name: Install Crossbar.io package dependencies & Crossbar.io
# run: |
# python -m pip install -r requirements-latest.txt
# python -m pip install .
# - name: Display Crossbar.io version
# run: |
# python -c "from autobahn import xbr; print(xbr.HAS_XBR)"
# python -c "import crossbar; print(crossbar.__version__)"
# - name: Run unit tests (Twisted Trial)
# run: |
# python -m twisted.trial crossbar
# - name: Run integration tests (Autobahn|Python Client)
# run: |
# ./test/test_ab_examples.sh
# - name: Run command line tests (Crossbar.io CLI)
# run: |
# ./test/test_cli.sh