Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,23 @@ jobs:
- '3.8'
- '3.9'
pytest-version:
- 4.6.11
- 5.4.3
- 6.2.4

- 4
- 5
- 6
exclude:
# pytest >= 5.x.x doesn't support Python 2.7
- os: ubuntu-latest
python-version: 2.7
pytest-version: 5.4.3
pytest-version: 5
- os: ubuntu-latest
python-version: 2.7
pytest-version: 6.2.4
pytest-version: 6
- os: windows-latest
python-version: 2.7
pytest-version: 5.4.3
pytest-version: 5
- os: windows-latest
python-version: 2.7
pytest-version: 6.2.4
pytest-version: 6

runs-on: ${{ matrix.os }}

Expand All @@ -49,17 +48,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest==${{ matrix.pytest-version }}

- name: Install itself
run: python setup.py install
pip install tox tox-gh-actions

- run: pytest
- name: Run test
run: tox
env:
PLATFORM: ${{ matrix.os }}
PYTEST_MAJOR_VERSION: ${{ matrix.pytest-version }}
PYTEST_PLUGINS: pytest_github_actions_annotate_failures

post-test:
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include *.py
include LICENSE
include CHANGELOG.md
include tox.ini
29 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[tox]
envlist = py27-pytest4-{linux,windows}, py{36,37,38,39}-pytest{4,5,6}-{linux,windows}

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
windows-latest: windows

PYTEST_MAJOR_VERSION =
4: pytest4
5: pytest5
6: pytest6

[testenv]
deps =
-rrequirements.txt
pytest4: pytest>=4.0.0,<5.0.0
pytest5: pytest>=5.0.0,<6.0.0
pytest6: pytest>=6.0.0,<7.0.0

commands = {envpython} -m pytest