Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from pytest to unittest #33

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- run: poetry install
- run: poetry run mypy .

pytest:
unittest:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -70,13 +70,20 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install poetry
- run: poetry install
- run: poetry run pytest --cov --cov-report=xml
- run: poetry run coverage run
- run: poetry run coverage report
- run: poetry run coverage lcov
- uses: codecov/codecov-action@v3
if: ${{ matrix.python-version == '3.10' }}

publish:
runs-on: ubuntu-latest
needs: [black, build, flake8, mypy, pytest]
needs:
- black
- build
- flake8
- mypy
- unittest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
Expand All @@ -86,4 +93,4 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
17 changes: 5 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
*.pyc
*.egg-info/
/.coverage
/.eggs/
/.mypy_cache/
/.pytest_cache/
/.tox/
/build/
/CHANGELOG.md
/dist/
/docs/_build
/MANIFEST
.coverage
*.lcov
.mypy_cache/
__pycache__/
_build/
dist/
123 changes: 2 additions & 121 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ python = "^3.7"

[tool.poetry.dev-dependencies]
black = { version = "*", python = ">= 3.8" }
coverage = { version = "*", extras = ["toml"] }
flake8 = { version = "*", python = ">= 3.8" }
flake8-docstrings = { version = "*", python = ">= 3.8" }
flake8-import-order = { version = "*", python = ">= 3.8" }
mypy = { version = "*", python = ">=3.8" }
pytest = "*"
pytest-cov = "*"
types-setuptools = { version = "*", python = ">=3.8" }

[tool.coverage.run]
branch = true
command_line = "-m unittest -v"
source = ["wakeonlan"]

[tool.coverage.report]
Expand Down
Loading