diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml new file mode 100644 index 0000000..ed78c66 --- /dev/null +++ b/.github/workflows/test-and-lint.yml @@ -0,0 +1,25 @@ +name: Python package + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.7', '3.8', '3.9', '3.10'] + + steps: + - uses: actions/checkout@v1 + - 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 + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox \ No newline at end of file diff --git a/tox.ini b/tox.ini index 8eb785e..c86e108 100644 --- a/tox.ini +++ b/tox.ini @@ -2,12 +2,19 @@ envlist = py37, py38, py39, py310, lint skip_missing_interpreters = True +[gh-actions] +python = + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310, lint + [testenv] setenv = LANG=en_US.UTF-8 PYTHONPATH = {toxinidir}:{toxinidir}/RFXtrx commands = - py.test -v --timeout=30 --cov --cov-report= {posargs} + py.test -v --timeout=30 --cov --cov-report= {posargs} py.test --doctest-modules doctest/ deps = -r{toxinidir}/requirements.txt