diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c7f011..43beb7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,10 @@ name: CI -on: [push, pull_request] +on: + pull_request: + push: + branches: + - "main" + - "dev*" jobs: build: @@ -9,7 +14,7 @@ jobs: max-parallel: 8 matrix: os: [ubuntu-latest, windows-latest] - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] steps: - name: Check out repository @@ -19,13 +24,27 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: "pip" - - name: Update pip + - name: Update pip and install dependencies run: | python -m pip install --upgrade pip - - name: Install tox + python -m pip install ".[test]" + + - name: Run tests run: | - python -m pip install tox tox-gh-actions - - name: Run tox + python -m doctest README.md + python -m doctest paper.md + python -m pytest docs \ + --nbval --nbval-current-env -p no:randomly + python -m pytest tests \ + --cov=matching --cov-fail-under=100 --hypothesis-profile=ci + + - name: Install and run linters (3.11-ubuntu only) + if: | + matrix.python-version == '3.11' && + matrix.os == 'ubuntu-latest' run: | - python -m tox + python -m pip install ".[lint]" + python -m black --check . + python -m ruff check . diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 2523142..0000000 --- a/tox.ini +++ /dev/null @@ -1,23 +0,0 @@ -[tox] -isolated_build = True -envlist = py37, py38, py39 - -[gh-actions] -python = - 3.7: py37 - 3.8: py38 - 3.9: py39 - -[testenv] -extras = dev -commands = - python -m black --check src tests docs - python -m isort --check src tests - python -m flake8 src tests - python -m interrogate src tests - python -m doctest paper.md - python -m doctest README.md - python -m pytest docs \ - --nbval --nbval-current-env -p no:randomly - python -m pytest tests \ - --cov=matching --cov-fail-under=100 --hypothesis-profile=ci \ No newline at end of file