Fix/translation functions fixes (#8) (#9) #17
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
name: test | |
on: | |
push: | |
branches: | |
- "main" | |
- "release" | |
pull_request: | |
branches: | |
- "*" | |
env: | |
GITHUB-TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
black-lint: | |
name: Lint with Black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: psf/black@stable | |
test: | |
name: Test django-advanced-password-validation | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
versions: | |
- { "djangoVersion": "2.2.28", "pythonVersion": "3.7" } | |
- { "djangoVersion": "2.2.28", "pythonVersion": "3.8" } | |
- { "djangoVersion": "2.2.28", "pythonVersion": "3.9" } | |
- { "djangoVersion": "2.2.28", "pythonVersion": "3.10" } | |
- { "djangoVersion": "3.2.16", "pythonVersion": "3.7" } | |
- { "djangoVersion": "3.2.16", "pythonVersion": "3.8" } | |
- { "djangoVersion": "3.2.16", "pythonVersion": "3.9" } | |
- { "djangoVersion": "3.2.16", "pythonVersion": "3.10" } | |
- { "djangoVersion": "4.0.8", "pythonVersion": "3.8" } | |
- { "djangoVersion": "4.0.8", "pythonVersion": "3.9" } | |
- { "djangoVersion": "4.0.8", "pythonVersion": "3.10" } | |
- { "djangoVersion": "4.1.2", "pythonVersion": "3.8" } | |
- { "djangoVersion": "4.1.2", "pythonVersion": "3.9" } | |
- { "djangoVersion": "4.1.2", "pythonVersion": "3.10" } | |
- { "djangoVersion": "4.2.3", "pythonVersion": "3.8" } | |
- { "djangoVersion": "4.2.3", "pythonVersion": "3.9" } | |
- { "djangoVersion": "4.2.3", "pythonVersion": "3.10" } | |
steps: | |
# Checkout the source | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Setup Python | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.versions.pythonVersion }} | |
# Install Dependencies | |
- name: Install dependencies | |
run: python -m pip install -r requirements_test.txt && python -m pip install -e . | |
# Install Django | |
- name: Install Django ${{ matrix.versions.djangoVersion }} | |
run: python -m pip install Django==${{ matrix.versions.djangoVersion }} | |
# Check syntax | |
- name: Check types, syntax and duckstrings | |
run: | | |
mypy --exclude=setup.py . | |
flake8 . | |
interrogate --quiet --fail-under=90 . | |
# Test package | |
- name: Test Django ${{ matrix.versions.djangoVersion }} with coverage | |
run: coverage run --source=django_advanced_password_validation -m pytest . && coverage lcov -o coverage.lcov | |
# Generate Coverage Report | |
- 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 |