-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🧑💻 Add term cov * 🔥 Remove tox.ini * 🔧 Add noxfile * 🔧 Replace tox with nox * 👷 Use nox in CI * 🧑💻 Reorder sessions * 🦺 Check noxfile.py * 👷 Fix CI * 👷 Fix python version
- Loading branch information
1 parent
f026a19
commit 90c9433
Showing
7 changed files
with
33 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,14 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
- run: python -m pip install --upgrade pip | ||
|
||
- name: Install tox | ||
run: pip install tox tox-gh-actions | ||
- name: Setup nox | ||
# Keep in sync with requirements-dev.txt | ||
uses: wntrblm/[email protected] | ||
|
||
- name: Run tox | ||
run: tox | ||
- run: nox --python ${{ matrix.python }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
run: pip install .[dev] | ||
|
||
- name: Run pytest | ||
run: pytest --cov=./graphix --cov-report=xml | ||
run: pytest --cov=./graphix --cov-report=xml --cov-report=term | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Run tests with nox.""" | ||
|
||
from __future__ import annotations | ||
|
||
import nox | ||
from nox import Session | ||
|
||
|
||
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"]) | ||
def tests_minimal(session: Session) -> None: | ||
"""Run the test suite with minimal dependencies.""" | ||
session.install("-e", ".") | ||
session.install("pytest", "pytest-mock", "psutil") | ||
session.run("pytest") | ||
|
||
|
||
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"]) | ||
def tests(session: Session) -> None: | ||
"""Run the test suite with full dependencies.""" | ||
session.install("-e", ".[dev]") | ||
session.run("pytest") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters