Skip to content

Commit

Permalink
add and api tests reports to allow easier debuging
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexdev8 committed Feb 23, 2024
1 parent be20497 commit 795036f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/backend-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@ jobs:
working-directory: ${{env.working-directory}}
run: |
export $(grep -v '^#' .env | xargs)
pytest app_tests/api
pytest app_tests/api --html=pytest-report.html --self-contained-html
- uses: actions/upload-artifact@v4
if: always()
with:
name: api-tests-report
path: pytest-report.html
retention-days: 5
1 change: 1 addition & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ db/django_secret_key
db/pg_password.txt
./db/
.coverage
pytest-report.html
1 change: 1 addition & 0 deletions backend/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pytest.ini
[pytest]
DJANGO_SETTINGS_MODULE = ciso_assistant.settings
generate_report_on_test=True
# -- recommended but optional:
python_files = *_test.py test_*.py
addopts = -p no:warnings
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ weasyprint==60.2
psycopg2-binary==2.9.9
gunicorn==21.2.0
pytest-django==4.8.0
pytest-html==1.1.1
django-filter==23.5
whitenoise==6.6.0
argon2-cffi==23.1.0
Expand Down

0 comments on commit 795036f

Please sign in to comment.