Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
b3cbeb3f
Commit
b3cbeb3f
authored
11 months ago
by
Roang
Browse files
Options
Downloads
Patches
Plain Diff
Update tox inis
- Change the structure of the tox.ini files to fit to pdm structure
parent
a53c73ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tox.ini
+1
-102
1 addition, 102 deletions
src/tox.ini
tox.ini
+72
-21
72 additions, 21 deletions
tox.ini
with
73 additions
and
123 deletions
src/tox.ini
+
1
−
102
View file @
b3cbeb3f
[tox]
requires
=
tox>=4
env_list
=
flake8, ruff, ruff_format, migrations, django-test
[hub]
setenv
=
ALLOWED_HOSTS
=
{env:ALLOWED_HOSTS}
DATABASE_URL
=
{env:DATABASE_URL}
DJANGO_DEBUG
=
I_KNOW_WHAT_I_AM_DOING
DJANGO_SETTINGS_MODULE
=
hub.settings.test
DISABLE_REQUEST_LOGGING
=
True
HUB_DB_SCHEMA
=
{env:HUB_SCHEMA}
SERVE_API
=
True
SERVE_BACKOFFICE
=
True
SERVE_FRONTEND
=
True
SSO_SECRET_GENERATE
=
True
STORAGE_TYPE
=
local
USE_PLAIN_STATICFILES
=
True
METRICS_SERVER_IPS
=
"127.0.0.1,localhost"
# This needs to be set here in order to test the badge rate limit
BADGE_RATE_LIMIT
=
1/h
[testenv:flake8]
skip_install
=
true
sitepackages
=
true
allowlist_externals
=
flake8
commands
=
flake8
.
[testenv:ruff]
skip_install
=
true
sitepackages
=
true
allowlist_externals
=
ruff
commands
=
ruff
.
[testenv:ruff_format]
skip_install
=
true
sitepackages
=
true
allowlist_externals
=
ruff
commands
=
ruff
format
.
--diff
[testenv:app_version]
system_site_packages
=
true
setenv
=
{
[hub]
setenv}
allowlist_externals
=
./manage.py
commands
=
./manage.py
appversion
[testenv:migrations]
system_site_packages
=
true
setenv
=
{
[hub]
setenv}
allowlist_externals
=
./manage.py
commands
=
./manage.py
makemigrations
--dry-run
./manage.py
makemigrations
--check
[testenv:django-test]
system_site_packages
=
true
setenv
=
{
[hub]
setenv}
PYTHONWARNINGS
=
always
allowlist_externals
=
./manage.py
coverage
commands
=
coverage
run
./manage.py
test
-v
2
{posargs}
coverage
xml
-i
coverage
report
[testenv:django-test-no-coverage]
system_site_packages
=
true
setenv
=
{
[hub]
setenv}
allowlist_externals
=
./manage.py
commands
=
./manage.py
test
-v
2
{posargs}
[testenv:django-full]
system_site_packages
=
true
...
...
@@ -101,27 +18,9 @@ commands =
coverage
run
./manage.py
test
-v
2
{posargs}
coverage
report
[flake8]
max-line-length
=
160
per-file-ignores
=
./*/migrations/*:E501
./hub/settings/*:F403,F405
./*/tests.py:F401
ignore
=
E203, W503, W191, E111, E114, E117, D206, D300, Q000, Q001, Q002, Q003, COM812, COM819, ISC001, ISC002
[coverage:run]
data_file
=
.coverage/coverage
data_file
=
.
./.tools/
coverage/coverage
dynamic_context
=
test_function
omit
=
*/migrations/*
branch
=
true
[coverage:report]
skip_covered
=
true
show_missing
=
true
[coverage:xml]
output
=
.coverage/coverage.xml
[coverage:html]
directory
=
.coverage/html_report
This diff is collapsed.
Click to expand it.
tox.ini
+
72
−
21
View file @
b3cbeb3f
[tox]
requires
=
tox>=4
env_list
=
ruff, ruff_format
env_list
=
py-lint, py-format, migrations, django-test, coverage-report
work_dir
=
.tools/tox
[testenv:ruff]
[hub]
setenv
=
ALLOWED_HOSTS
=
{env:ALLOWED_HOSTS}
DATABASE_URL
=
{env:DATABASE_URL}
DJANGO_DEBUG
=
I_KNOW_WHAT_I_AM_DOING
DJANGO_SETTINGS_MODULE
=
hub.settings.test
DISABLE_REQUEST_LOGGING
=
True
HUB_DB_SCHEMA
=
{env:HUB_SCHEMA}
SERVE_API
=
True
SERVE_BACKOFFICE
=
True
SERVE_FRONTEND
=
True
SSO_SECRET_GENERATE
=
True
STORAGE_TYPE
=
local
USE_PLAIN_STATICFILES
=
True
METRICS_SERVER_IPS
=
"127.0.0.1,localhost"
[testenv]
skip_install
=
true
sitepackages
=
true
[testenv:py-lint]
groups
=
lint
commands
=
ruff .
[testenv:py-format]
groups
=
lint
commands
=
ruff format . --diff
[testenv:migrations]
groups
=
dev
change_dir
=
{toxinidir}/src
setenv
=
{
[hub]
setenv}
allowlist_externals
=
ruff
./manage.py
commands
=
ruff
.
./manage.py
makemigrations
--dry-run
./manage.py
makemigrations
--check
[testenv:ruff_format]
skip_install
=
true
sitepackages
=
true
allowlist_externals
=
ruff
[testenv:django-test]
groups
=
dev
change_dir
=
{toxinidir}/src
setenv
=
{
[hub]
setenv}
PYTHONWARNINGS
=
always
commands
=
ruff
format
.
--diff
coverage
run
./manage.py
test
-v
2
{posargs}
[flake8]
max-line-length
=
160
per-file-ignores
=
./core/migrations/*:E501
./hub/settings/*:F403,F405
./*/tests.py:F401
ignore
=
E203, W503, W191, E111, E114, E117, D206, D300, Q000, Q001, Q002, Q003, COM812, COM819, ISC001, ISC002
[testenv:live-test]
groups
=
dev
change_dir
=
{toxinidir}
setenv
=
{
[hub]
setenv}
PYTHONWARNINGS
=
always
SERVE_API
=
yes
commands
=
python
-m
unittest
{posargs}
[testenv:coverage-report]
deps
=
coverage
commands
=
coverage
report
coverage
xml
coverage
html
[coverage:run]
data_file
=
src/.coverage/coverage
data_file
=
.tools/coverage/coverage
dynamic_context
=
test_function
omit
=
*/migrations/*
branch
=
true
[coverage:report]
show_missing
=
true
[coverage:paths]
src
=
...
...
@@ -36,4 +84,7 @@ src=
/app/
[coverage:xml]
output
=
coverage.xml
output
=
.tools/coverage/coverage.xml
[coverage:html]
directory
=
.tools/coverage/html
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment