Skip to content

Commit

Permalink
Replace nox by tox in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mstuttgart committed Nov 20, 2024
1 parent 3a2ee30 commit e0bf703
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 61 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:

- name: Install coverage dependencies
run: |
pip install -e ".[dev]"
pip install ".[dev]"
pip install ".[coverage]"
- name: Run coverage tests
run: nox -s coverage
run: make coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Install test dependencies
run: |
pip install -e ".[dev]"
pip install ".[dev]"
- name: Lint with ruff
run: nox -s lint
run: make lint
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ jobs:
python-version: "3.*"

- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
run: pip install ".[build]"

- name: Build a binary wheel and a source tarball
run: python3 -m build
Expand All @@ -39,7 +35,8 @@ jobs:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
# only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install test dependencies
run: pip install -e ".[dev]"
run: pip install ".[dev]"

- name: Run tests
run: nox -s tests
run: make test
49 changes: 0 additions & 49 deletions noxfile.py

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dev = [

coverage = ["coveralls>=3.3.1", "pytest-cov>=4.0.0", "requests-mock>=1.10.0"]
docs = ["mkdocs-material>=9.1.6", "mkdocs>=1.4.2"]
build = ["build==1.2.2.post1"]

[project.urls]
Documentation = "https://github.com/mstuttgart/brazilcep/tree/main#readme"
Expand Down
21 changes: 21 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tox]
requires =
tox>=4.2
env_list =
pre-commit
python3.{13, 12, 11, 10, 9}
skip_missing_interpreters = true

[testenv]
deps =
-e ".[dev]"
commands =
pytest

[testenv:pre-commit]
base_python = python
deps =
pre-commit
commands =
pre-commit autoupdate
pre-commit run --all-files

0 comments on commit e0bf703

Please sign in to comment.