diff --git a/.github/workflows/typeguard.yml b/.github/workflows/typeguard.yml new file mode 100644 index 000000000..19af3ff11 --- /dev/null +++ b/.github/workflows/typeguard.yml @@ -0,0 +1,18 @@ +name: typeguard + +on: + - push + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install nox + - name: Test with nox + run: nox -e pytest_typeguard diff --git a/noxfile.py b/noxfile.py index 6a68e1a56..e63e750b0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,17 +4,16 @@ @nox.session(python=["3.7", "3.8", "3.9", "3.10"]) @nox.parametrize("all_deps", [True, False]) def pytest(session, all_deps): - if all_deps: - session.install(".[testing,other]") - else: - session.install(".[testing]") - + session.install(".[testing,other]" if all_deps else ".[testing]") session.run("coverage", "erase") + session.run("pytest") + - if session.python == "3.10": - session.run("pytest", "--typeguard-packages=adaptive") - else: - session.run("pytest") +@nox.session(python="3.10") +def pytest_typeguard(session): + session.install(".[testing,other]") + session.run("coverage", "erase") + session.run("pytest", "--typeguard-packages=adaptive") @nox.session(python="3.7")