-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from mostafa/add-tests
Add tests, CI and other things
- Loading branch information
Showing
12 changed files
with
627 additions
and
82 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
per-file-ignores = | ||
django_advanced_password_validation/tests/settings.py: E501 | ||
exclude = | ||
dist, | ||
build, | ||
env, | ||
venv, | ||
.env, | ||
.venv, |
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,37 @@ | ||
name: test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Test django-advanced-password-validation | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
versions: | ||
- { "djangoVersion": "4.1.2", "pythonVersion": "3.10" } | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 🐍 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.versions.pythonVersion }} | ||
- name: Install dependencies 📦 | ||
run: python -m pip install -r requirements_test.txt && python -m pip install -e . | ||
- name: Install Django ${{ matrix.versions.djangoVersion }} 📦 | ||
run: python -m pip install Django==${{ matrix.versions.djangoVersion }} | ||
- name: Check types, syntax and duckstrings 🦆 | ||
run: | | ||
mypy --exclude=setup.py . | ||
flake8 . | ||
interrogate --quiet --fail-under=90 . | ||
- name: Test Django ${{ matrix.versions.djangoVersion }} with coverage 🧪 | ||
run: coverage run --source=django_advanced_password_validation -m pytest . && coverage lcov -o coverage.lcov | ||
- name: Submit coverage report to Coveralls 📈 | ||
if: ${{ success() }} | ||
uses: coverallsapp/github-action@1.1.3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./coverage.lcov | ||
|
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,4 +1,5 @@ | ||
build/ | ||
dist/ | ||
*.egg-info/ | ||
.vs/ | ||
.vs/ | ||
__pycache__ |
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,5 +1,3 @@ | ||
from . import advanced_password_validation | ||
|
||
__all__ = [ | ||
'advanced_password_validation' | ||
] | ||
__all__ = ["advanced_password_validation"] |
Oops, something went wrong.