-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
47 lines (40 loc) · 1.24 KB
/
tox.ini
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
[tox]
envlist = py{37,38,39,310}-{windows,linux}-pytest,py{37,38,39,310}-{windows,linux}-{flake8,mypy}
isolated_build = True
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[gh-actions:env]
PLATFORM =
windows-latest: windows
ubuntu-latest: linux
[testenv]
passenv = *
platform =
linux: linux
windows: win32
allowlist_externals =
windows: cmd
windows: powershell
linux: mkdir
linux: bash
commands_pre =
linux: mkdir -p ./reports
windows: cmd /c if not exist .\\reports mkdir .\\reports
python -m pip install pip -U
pip install .[all]
[testenv:py{37,38,39,310,311}-{windows,linux}-pytest]
commands =
linux: bash -c "pytest . | tee ./reports/test-console-results.txt"
windows: powershell /c "pytest | Tee-Object .\\reports\\test-console-results.txt"
windows: python -c "file = open('./reports/test-console-results.txt', 'rb');results=file.read();file.close();file = open('./reports/test-console-results.txt', 'wb');file.write(results.replace(b'\\r\\n', b'\\n'));file.close()"
[testenv:py{37,38,39,310,311}-{windows,linux}-mypy]
commands =
mypy fastmessage
[testenv:py{37,38,39,310,311}-{windows,linux}-flake8]
commands =
flake8 fastmessage tests