Update tests to use pytest

This commit is contained in:
Ben Lopatin
2021-12-18 15:01:44 -05:00
parent 1a22796e8e
commit 8a0e742abd
3 changed files with 18 additions and 10 deletions
+13 -9
View File
@@ -1,6 +1,6 @@
name: Tests
on: [push, pull_request]
on: [ push, pull_request ]
jobs:
test:
@@ -9,13 +9,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
py_version: ["3.7", "3.8", "3.9", "3.10"]
py_version: [ "3.7", "3.8", "3.9", "3.10" ]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.py_version }}
- name: Run tests
run: python setup.py test
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.py_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.py_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: pytest --cov=pydiscourse
+2
View File
@@ -0,0 +1,2 @@
pytest==6.2.5
pytest-cov==3.0.0
+3 -1
View File
@@ -4,7 +4,9 @@ envlist = py37, py38, py39, py310
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/pydiscourse
commands = python setup.py test
commands = pytest {posargs} --cov=pydiscourse
deps =
-r{toxinidir}/requirements.txt
[testenv:flake8]
basepython=python