@@ -31,23 +31,35 @@ jobs:
3131 matrix :
3232 os : [ubuntu-latest, windows-latest, macos-latest]
3333 python : [cp27, cp37, cp38, cp39]
34+ # Install cothread and pytest-asyncio by default
35+ test_requires : ['pytest-asyncio cothread aioca']
36+ # Put coverage straight in the dist dir by default
37+ cov_file : ['{project}/dist/coverage.xml']
3438
35- include :
36- - os : macos-latest
37- TEST_REQUIRES : pytest-cov cothread
38- # Put coverage straight in the dist dir
39- COV_FILE : ' {project}/dist/coverage.xml'
39+ exclude :
40+ - os : windows-latest
41+ # No cothread or asyncio so doesn't work
42+ python : cp27
4043
44+ include :
4145 - os : ubuntu-latest
42- TEST_REQUIRES : pytest-cov cothread
4346 # Put coverage in the output dir mounted in docker
44- COV_FILE : ' /output/coverage.xml'
47+ cov_file : ' /output/coverage.xml'
4548
4649 - os : windows-latest
4750 # cothread doesn't work on windows
48- TEST_REQUIRES : pytest-cov
49- # Put coverage straight in the dist dir
50- COV_FILE : ' {project}/dist/coverage.xml'
51+ test_requires : pytest-asyncio aioca
52+
53+ - os : ubuntu-latest
54+ python : cp27
55+ # asyncio doesn't work on Python2.7
56+ test_requires : cothread
57+
58+ - os : macos-latest
59+ python : cp27
60+ # asyncio doesn't work on Python2.7
61+ test_requires : cothread
62+
5163
5264 steps :
5365 - name : Checkout Source
7082 run : cibuildwheel --output-dir dist
7183 env :
7284 CIBW_BUILD : ${{ matrix.python }}*64
73- CIBW_TEST_REQUIRES : ${{ matrix.TEST_REQUIRES }}
74- CIBW_TEST_COMMAND : pytest --cov=softioc {project}/tests --cov-report xml:${{ matrix.COV_FILE }}
85+ CIBW_TEST_REQUIRES : pytest-cov ${{ matrix.test_requires }}
86+ CIBW_TEST_COMMAND : pytest --cov=softioc {project}/tests --cov-report xml:${{ matrix.cov_file }}
7587 # Disable auditwheel as it isn't compatible with setuptools_dso approach
7688 # https://github.com/mdavidsaver/setuptools_dso/issues/17
7789 CIBW_REPAIR_WHEEL_COMMAND : ' '
0 commit comments