-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
143 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,23 +14,40 @@ jobs: | |
python-version: | ||
- "3.8" | ||
- "3.9" | ||
# - "3.10" | ||
- "3.10" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v2.2.2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install --use-deprecated legacy-resolver -r requirements_test.txt | ||
sudo apt-get update | ||
sudo apt-get -y install language-pack-it | ||
- name: Generate coverage report | ||
run: | | ||
python -m pytest | ||
pip install pytest-cov | ||
pytest ./tests/ --cov=custom_components/mail_and_packages/ --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox | ||
- name: Upload coverage data | ||
uses: "actions/[email protected]" | ||
with: | ||
name: coverage-data | ||
path: "coverage.xml" | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
- name: Download coverage data | ||
uses: actions/[email protected] | ||
with: | ||
name: coverage-data | ||
- name: Upload coverage report | ||
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 |
---|---|---|
@@ -1,19 +1,78 @@ | ||
custom_components/.DS_Store | ||
custom_components/mail_and_packages/.DS_Store | ||
custom_components/mail_and_packages/__pycache__/.DS_Store | ||
includes/.DS_Store | ||
includes/packages/.DS_Store | ||
www/.DS_Store | ||
www/mail_and_packages/.DS_Store | ||
# Hide some OS X stuff | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
custom_components/mail_and_packages/camera.py.old | ||
custom_components/mail_and_packages/.backup/__init__.py | ||
custom_components/mail_and_packages/.backup/camera.py | ||
custom_components/mail_and_packages/.backup/manifest.json | ||
custom_components/mail_and_packages/.backup/sensor.py | ||
notes.txt | ||
.vscode/settings.json | ||
*.pyc | ||
.coverage | ||
|
||
# Test files | ||
ra_0_mailerProvidedImage0 | ||
mailerProvidedImage0 | ||
|
||
# pytest | ||
.pytest_cache | ||
.cache | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
coverage.xml | ||
nosetests.xml | ||
htmlcov/ | ||
test-reports/ | ||
test-results.xml | ||
test-output.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
.python-version | ||
|
||
# emacs auto backups | ||
*~ | ||
*# | ||
*.orig | ||
|
||
# venv stuff | ||
pyvenv.cfg | ||
pip-selfcheck.json | ||
venv | ||
.venv | ||
Pipfile* | ||
share/* | ||
Scripts/ | ||
|
||
# vimmy stuff | ||
*.swp | ||
*.swo | ||
tags | ||
ctags.tmp | ||
|
||
# vagrant stuff | ||
virtualization/vagrant/setup_done | ||
virtualization/vagrant/.vagrant | ||
virtualization/vagrant/config | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/cSpell.json | ||
!.vscode/extensions.json | ||
!.vscode/tasks.json | ||
|
||
# Typing | ||
.mypy_cache | ||
*.pyc |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ black | |
isort | ||
flake8 | ||
pydocstyle | ||
pylint | ||
pylint | ||
mypy |
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,39 @@ | ||
[tox] | ||
skipsdist = true | ||
envlist = py38, py39, py310, lint, mypy | ||
skip_missing_interpreters = True | ||
ignore_basepython_conflict = True | ||
|
||
[gh-actions] | ||
python = | ||
3.8: py38, lint, mypy | ||
3.9: py39 | ||
3.10: py310 | ||
|
||
[testenv] | ||
pip_version = pip>=21.0,<22.1 | ||
install_command = python -m pip install --use-deprecated legacy-resolver {opts} {packages} | ||
commands = | ||
pytest --timeout=30 --cov=custom_components/mail_and_packages/ --cov-report=xml {posargs} | ||
deps = | ||
-rrequirements_test.txt | ||
|
||
[testenv:lint] | ||
basepython = python3 | ||
ignore_errors = True | ||
commands = | ||
black --check custom_components/mail_and_packages/ | ||
flake8 custom_components/mail_and_packages/ | ||
pylint custom_components/mail_and_packages/ | ||
pydocstyle custom_components/mail_and_packages/ tests/ | ||
deps = | ||
-rrequirements_format.txt | ||
-rrequirements_test.txt | ||
|
||
[testenv:mypy] | ||
basepython = python3 | ||
ignore_errors = True | ||
commands = | ||
mypy custom_components/mail_and_packages/ | ||
deps = | ||
-rrequirements_format.txt |