Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Fixes CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
AngellusMortis committed Sep 15, 2022
1 parent 811ac32 commit 7054dab
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .bin/update-requirements
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ dj_stable="4.1"

for dj_version in "${dj_versions[@]}"; do
echo "Generating requirements for Django $dj_version..."
echo "django~=$dj_version" > django.in
if [[ "$dj_version" == "$dj_stable" ]]; then
echo -e "django~=$dj_stable\ndjango-constance[database]" > django.in
else
echo -e "django~=$dj_stable" > django.in
fi
pip-compile --pip-args='--root-user-action=ignore' -q --extra=dev --extra=ql --upgrade --output-file=reqs/dj$dj_version-requirements.txt pyproject.toml django.in
rm django.in
done
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [master]

env:
DEFAULT_DJANGO: "3.2"
DEFAULT_DJANGO: "4.1"
DEFAULT_PYTHON: "3.10"

jobs:
Expand Down Expand Up @@ -42,11 +42,10 @@ jobs:
- name: Test with pytest
run: |
export PYTHONPATH=$GITHUB_WORKSPACE
pytest --rich --ignore=tests/test_zconstance.py
pytest --ignore=tests/test_zconstance.py
if [[ "${{ matrix.django }}" == "${{ env.DEFAULT_DJANGO }}" ]]; then
pytest --rich tests/test_zconstance.py
pytest tests/test_zconstance.py
fi
coverage report -m
- name: Publish Code Coverage
uses: paambaati/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ combine_as_imports = true

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.site.settings"
addopts = "--cov-config .coveragerc --cov-branch --cov-append --cov-report term-missing --color=yes --no-cov-on-fail --cov=microsoft_auth --durations=10 --maxfail=5"
addopts = "--rich --cov-config .coveragerc --cov-branch --cov-append --cov-report term-missing --color=yes --no-cov-on-fail --cov=microsoft_auth --durations=10 --maxfail=5"

[tool.setuptools]
include-package-data = true
Expand Down
6 changes: 2 additions & 4 deletions reqs/dj3.2-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cryptography==38.0.1
# via pyjwt
decorator==5.1.1
# via ipython
django==3.2.15
django==4.1.1
# via
# -r django.in
# django-microsoft-auth (pyproject.toml)
Expand Down Expand Up @@ -177,9 +177,7 @@ pytest-django==4.5.2
pytest-rich==0.1.1
# via django-microsoft-auth (pyproject.toml)
pytz==2022.2.1
# via
# babel
# django
# via babel
pyyaml==6.0
# via bandit
requests==2.28.1
Expand Down
5 changes: 5 additions & 0 deletions reqs/dj4.1-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ django==4.1.1
# via
# -r django.in
# django-microsoft-auth (pyproject.toml)
# django-picklefield
django-constance[database]==2.9.1
# via -r django.in
django-picklefield==3.1
# via django-constance
djangoql==0.17.1
# via django-microsoft-auth (pyproject.toml)
doc8==1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/site/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

USE_I18N = True

USE_L10N = True
USE_TZ = True

LANGUAGE_CODE = "en-us"

Expand Down

0 comments on commit 7054dab

Please sign in to comment.