Skip to content

Commit

Permalink
added tox testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nickeldan committed Aug 31, 2023
1 parent d1fb144 commit ff985a3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Tox tests

on:
- push
- pull_request

jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
python-version: ['3.10', '3.11']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
black==23.7.0
flake8==6.1.0
flake8-annotations==3.0.1
mypy==1.4.1
flake8-warnings==0.4.0
mypy==1.4.1
pytest==7.4.0
15 changes: 15 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tox]
isolated_build = true
envlist = py310, py311

[gh-actions]
python =
3.10: py310
3.11: py311

[testenv]
deps = -rrequirements-dev.txt
commands =
pytest tests
black --check .
mypy .

0 comments on commit ff985a3

Please # to comment.