Skip to content

Commit 45f7f47

Browse files
committed
Merge branch 'test_macos' into test_windows
2 parents f2ce139 + acaffa8 commit 45f7f47

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
os:
3333
- name: Linux
3434
runs-on: ubuntu-latest
35-
python_platform: linux
3635
matrix: linux
3736
container:
3837
2.7: docker://python:2.7-buster
@@ -42,17 +41,15 @@ jobs:
4241
3.9: docker://python:3.9-buster
4342
pypy2: docker://pypy:2-jessie
4443
pypy3: docker://pypy:3-stretch
44+
- name: macOS
45+
runs-on: macos-latest
46+
matrix: macos
4547
- name: Windows
4648
runs-on: windows-latest
47-
python_platform: win32
4849
matrix: windows
4950
openssl:
5051
x86: win32
5152
x64: win64
52-
# - name: macOS
53-
# runs-on: macos-latest
54-
# python_platform: darwin
55-
# matrix: macos
5653
python:
5754
- name: CPython 2.7
5855
tox: py27
@@ -165,6 +162,13 @@ jobs:
165162
echo "INCLUDE=$PYPY_EXTERNALS_PATH/include;$INCLUDE" >> $GITHUB_ENV
166163
echo "LIB=$PYPY_EXTERNALS_PATH/lib;$LIB" >> $GITHUB_ENV
167164
# echo "CL=${{ matrix.PYTHON.CL_FLAGS }}" >> $GITHUB_ENV
165+
- name: Add Brew
166+
if: ${{ matrix.os.matrix == 'macos' && matrix.python.implementation == 'pypy'}}
167+
shell: bash
168+
run: |
169+
brew install openssl@1.1 rust
170+
echo "LDFLAGS=-L$(brew --prefix openssl@1.1)/lib" >> $GITHUB_ENV
171+
echo "CFLAGS=-I$(brew --prefix openssl@1.1)/include" >> $GITHUB_ENV
168172
- name: rustup
169173
if: ${{ matrix.os.matrix == 'windows' && matrix.python.implementation == 'pypy'}}
170174
shell: bash
@@ -206,7 +210,6 @@ jobs:
206210
os:
207211
- name: Linux
208212
runs-on: ubuntu-latest
209-
python_platform: linux
210213
matrix: linux
211214
container:
212215
3.8: docker://python:3.8-buster
@@ -240,6 +243,7 @@ jobs:
240243
# Should match JOB_NAME below
241244
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
242245
runs-on: ${{ matrix.os.runs-on }}
246+
if: always()
243247
needs:
244248
- test
245249
container: ${{ matrix.os.container[matrix.python.docker] }}
@@ -253,7 +257,6 @@ jobs:
253257
os:
254258
- name: Linux
255259
runs-on: ubuntu-latest
256-
python_platform: linux
257260
matrix: linux
258261
container:
259262
3.8: docker://python:3.8-buster

test/test_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def handle_failure(failure):
237237
def testSerialTornadoClient(self, method, framer):
238238
""" Test the serial tornado client client initialize """
239239
from serial import Serial
240-
with maybe_manage(sys.platform == 'win32', patch.object(Serial, "open")):
240+
with maybe_manage(sys.platform in ('darwin', 'win32'), patch.object(Serial, "open")):
241241
protocol, future = AsyncModbusSerialClient(schedulers.IO_LOOP, method=method, port=SERIAL_PORT)
242242
client = future.result()
243243
assert(isinstance(client, AsyncTornadoModbusSerialClient))

0 commit comments

Comments
 (0)