Skip to content

Commit

Permalink
add test suite with tox
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Jul 29, 2024
1 parent dfb33d4 commit 5bb55e2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Tests

on:
- push

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,37 @@ mkdocs = "^1.4.3"
mkdocs-material = "^9.1.17"
mkdocstrings = {extras = ["python"], version = "^0.22.0"}

[tool.ruff]
line-length = 88

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"**/tests/*" = ["S101"]

[tool.pytest.ini_options]
minversion = 6.0
addopts = "--cov=lyft_bikes --cov-report=xml --cov-report=term-missing"
testpaths = ["tests"]

[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.0
isolated_build = true
env_list =
# tox and distutils
py312
py311
py310
py39
[testenv]
deps =
pytest
pytest-cov
commands = pytest
"""

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 5bb55e2

Please sign in to comment.