Skip to content

Commit

Permalink
Merge pull request #1 from dlstadther/feature/nox
Browse files Browse the repository at this point in the history
add nox to github ci
  • Loading branch information
dlstadther authored Oct 15, 2023
2 parents 53bd943 + b0e972f commit fe84781
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,25 @@ jobs:
- name: Test with pytest
run: poetry run coverage run -m pytest -vv tests && poetry run coverage report

# nox:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version:
# - "3.9"
# steps:
# - uses: actions/checkout@v4

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install dependencies
# run: |
# curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1
# poetry install

# - name: Test with nox
# run: poetry run nox --reuse-existing-virtualenvs --no-install
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ test:
poetry run coverage run -m pytest -vv $(TEST_DIR) && poetry run coverage report -m

test-all:
poetry run nox -r
poetry run nox --reuse-existing-virtualenvs --no-install
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ poetry run pytest -vv tests/test_main.py::test_hi
make test-all

# run all nox lints
poetry run nox -r -s lint
poetry run nox -R -s lint
```

### Build Docs
Expand Down
6 changes: 3 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ def _install_poetry(session: nox.Session) -> nox.Session:
return session


@nox.session(python=["3.9"])
@nox.session
def tests(session: nox.Session) -> None:
session = _install_poetry(session=session)
session.run("coverage", "run", "-m", "pytest")
session.run("coverage", "run", "-m", "pytest", "-vv")
session.run("coverage", "report")


@nox.session
def lint(session: nox.Session) -> None:
session = _install_poetry(session=session)
session.run("black", "--check", ".")
session.run("ruff", ".")
session.run("ruff", "--output-format=github", ".")


@nox.session
Expand Down

0 comments on commit fe84781

Please sign in to comment.