forked from zeromq/pyzmq
-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (145 loc) · 4.59 KB
/
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
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
name: Test
on:
push:
pull_request:
env:
FORCE_COLOR: "1"
PYZMQ_CYTHON_COVERAGE: "1"
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: pre-commit/[email protected]
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
MACOSX_DEPLOYMENT_TARGET: "10.14"
strategy:
fail-fast: false
matrix:
include:
- os: macos-10.15
python: 3.6
- os: macos-10.15
python: 3.9
zmq: bundled
- os: macos-10.15
python: pypy3
zmq: bundled
- os: ubuntu-18.04
python: 3.6
zmq: bundled
tornado: none
- os: ubuntu-20.04
python: pypy3
zmq: bundled
- os: ubuntu-20.04
python: pypy3
- os: ubuntu-20.04
python: 3.7
tornado: 4.5.*
- os: ubuntu-20.04
python: 3.9
tornado: head
- os: ubuntu-20.04
python: 3.8
zmq: head
- os: windows-2019
python: 3.6
arch: x86
- os: windows-2019
python: 3.9
arch: x64
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch || 'x64' }}
- name: setup coverage
if: startsWith(matrix.python, 'pypy')
run: |
grep -v plugins .coveragerc > .coveragerc-pypy
mv .coveragerc-pypy .coveragerc
- name: install dependencies
run: |
pip install --upgrade pip wheel
pip install -r test-requirements.txt
- name: install cython
if: "! startsWith(matrix.python, 'pypy')"
run: |
pip install cython
python setup.py cython
- name: remove tornado
if: matrix.tornado == 'none'
run: |
pip uninstall -y tornado
- name: install tornado-head
if: matrix.tornado == 'head'
run: |
pip install https://github.com/tornadoweb/tornado/archive/HEAD.zip
- name: install pinned tornado
if: matrix.tornado && matrix.tornado != 'none' && matrix.tornado != 'head'
run: |
pip install tornado=="${{ matrix.tornado }}"
- name: show environment
run: |
pip freeze
# preserve pip cache to speed up installation
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ runner.python }}-${{ hashFiles('*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: install mac dependencies
if: startsWith(matrix.os, 'mac') && matrix.zmq != 'bundled'
run: |
brew install libsodium zeromq
- name: install linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get -y remove libzmq5 || true # workaround https://github.com/actions/virtual-environments/issues/3317
sudo apt-get -y install libzmq3-dev libsodium-dev
- name: install libzmq-dev
if: matrix.zmq == 'head'
run: |
wget https://github.com/zeromq/libzmq/archive/HEAD.zip -O libzmq.zip
unzip libzmq.zip
pushd libzmq-*
./autogen.sh
./configure --enable-drafts
make -j4
sudo make install
sudo ldconfig
popd
echo "ZMQ_PREFIX=/usr/local" >> "$GITHUB_ENV"
export ZMQ_DRAFT_API=1 >> "$GITHUB_ENV"
- name: build pyzmq
run: |
pip install -v -e . --global-option=--zmq=${{ matrix.zmq }}
- name: import zmq
run: |
python -c "import zmq"
- name: run tests
run: |
python -m pytest --maxfail 2 --cov zmq -m "not wheel and not new_console" -v zmq/tests
- name: upload coverage
run: codecov
# FIXME: what's the right incantation to call this?
# the same line from appveyor doesn't work here
# - name: run extra windows tests
# if: startsWith(matrix.os, 'win')
# run: |
# cmd /c start /wait test pytest -vsx -m new_console --pyargs zmq.tests --junit-xml=./results.xml
# python tools/check_junit_result.py ./results.xml