Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cov test #151

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/incremental-coverage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,28 @@ jobs:
run: |
pip3 install -r requirements.txt
pip3 install coverage django_coverage_plugin
- name: ls
run: |
pwd
ls -lah
- name: Python unittest
continue-on-error: true
run: |
coverage run -m manage.py test
coverage run -m unittest discover test
- name: Generate coverage report
continue-on-error: true
run: |
coverage report -m
coverage json
- uses: velis74/incremental-coverage-check@main

- name: Coverage check on pull_request
uses: velis74/incremental-coverage-check@main
with:
py_coverage_json: coverage.json
logging_level: INFO
base_ref: ${{ github.base_ref }}
head_ref: HEAD
rep_ref: main

logging_level: INFO
gh_token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{github.event.pull_request.number}}
if: github.event_name == 'pull_request'
22 changes: 12 additions & 10 deletions django_project_base/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
from django_project_base.router import django_project_base_router
from django_project_base.views import browser_update_script

SPECTACULAR_DEFAULTS['TITLE'] = 'Rest documentation'
SPECTACULAR_DEFAULTS['DESCRIPTION'] = 'Api documentation'
SPECTACULAR_DEFAULTS['VERSION'] = '0.0.1'
SPECTACULAR_DEFAULTS['PREPROCESSING_HOOKS'] = [
'django_project_base.router.filter_rest_documentation_endpoints'
SPECTACULAR_DEFAULTS["TITLE"] = "Rest documentation"
SPECTACULAR_DEFAULTS["DESCRIPTION"] = "Api documentation"
SPECTACULAR_DEFAULTS["VERSION"] = "0.0.1"
SPECTACULAR_DEFAULTS["PREPROCESSING_HOOKS"] = [
"django_project_base.router.filter_rest_documentation_endpoints"
]

SPECTACULAR_DEFAULTS['POSTPROCESSING_HOOKS'] = [
'django_project_base.router.postprocess_rest_documentation'
SPECTACULAR_DEFAULTS["POSTPROCESSING_HOOKS"] = [
"django_project_base.router.postprocess_rest_documentation"
]

urlpatterns = [
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
re_path('browser-update/js-script', browser_update_script, name='browser-update-script'),
re_path(r'', include(django_project_base_router.urls)),
path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"),
re_path(
"browser-update/js-script", browser_update_script, name="browser-update-script"
),
re_path(r"", include(django_project_base_router.urls)),
]
Loading