Skip to content
Snippets Groups Projects
Select Git revision
  • ical-export
  • develop default protected
  • feature/audit_log
  • fix/index
  • badge-redeem-404
  • 720-schedule_source
  • room-docu
  • chore/event-views
  • 511-schedule-foo-fixed
  • 607-schedule-versions
  • deploy/curl-verbose
  • fix/public-badge-access-rights
  • 445-schedule-redirects
  • 623-wiki-im-baustellenmodus-sollte-mal-als-wiki-admin-trotzdem-seiten-anlegen-bearbeiten-konnen
  • fix/registration_mail_subject
  • feature/conference-query-set
  • feature/568-habitatmanagement
  • feat/unit-integration-tests
  • camp23-prod
  • production
  • prod-2024-12-27_20-15
  • prod-2024-12-27_16-37
  • prod-2024-12-27_16-01
  • prod-2024-12-27_13-29
  • prod-2024-12-27_00-34
  • prod-2024-12-26_21-45
  • prod-2024-12-26_13-12
  • prod-2024-12-26_00-21
  • prod-2024-12-25_21-04
  • prod-2024-12-25_15-54
  • prod-2024-12-25_01-29
  • prod-2024-12-24_14-48
  • prod-2024-12-23_23-39
  • prod-2024-12-22_21-12
  • prod-2024-12-22_17-25
  • prod-2024-12-22_01-34
  • prod-2024-12-22_00-55
  • prod-2024-12-21_13-42
  • prod-2024-12-21_10-44
  • prod-2024-12-20_12-25
40 results

tox.ini

Blame
  • Forked from hub / hub
    184 commits behind the upstream repository.
    tox.ini 1.94 KiB
    [tox]
    requires =
        tox>=4
    env_list = py-lint, py-format, html-lint, html-format, migrations, django-test, coverage-report
    work_dir = .tools/tox
    
    [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
        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
    
    [testenv:py-lint]
    groups = lint
    commands = ruff check .
    
    [testenv:py-format]
    groups = lint
    commands = ruff format . --diff
    
    [testenv:html-lint]
    groups = lint
    commands =
        djlint --profile jinja -e j2 --lint .
        djlint --profile django -e html --lint .
    
    [testenv:html-format]
    groups = lint
    commands =
        djlint --profile jinja -e j2 --reformat .
        djlint --profile django -e html --reformat .
    
    [testenv:migrations]
    groups = dev
    change_dir = {toxinidir}/src
    setenv =
        {[hub]setenv}
    allowlist_externals =
        ./manage.py
    commands =
        ./manage.py makemigrations --dry-run
        ./manage.py makemigrations --check
    
    [testenv:django-test]
    groups = dev
    change_dir = {toxinidir}/src
    setenv =
        {[hub]setenv}
        PYTHONWARNINGS=always
    commands =
        coverage run ./manage.py test -v 2 {posargs}
    
    [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 = .tools/coverage/coverage
    dynamic_context = test_function
    omit =
        */migrations/*
        */tests/*
    branch=true
    
    [coverage:report]
    show_missing=true
    
    [coverage:paths]
    src=
        src/
        /app/
    
    [coverage:xml]
    output = .tools/coverage/coverage.xml
    
    [coverage:html]
    directory = .tools/coverage/html