Skip to content

Add max length limitation to open questions and raise error for when travel fields are empty and travel is selected #3197

Add max length limitation to open questions and raise error for when travel fields are empty and travel is selected

Add max length limitation to open questions and raise error for when travel fields are empty and travel is selected #3197

Workflow file for this run

name: Backend tests
on:
push:
branches:
- main
pull_request:
paths:
- "backend/**/*"
- "backend/*"
- ".github/workflows/backend-test.yml"
jobs:
unit-tests:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: backend
services:
postgres:
image: postgres:14.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7.2.3
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13.5"
- name: Install uv
uses: astral-sh/setup-uv@v4
id: setup-uv
with:
version: "0.5.5"
enable-cache: true
- run: pip install codecov
- name: Install python dependencies
if: steps.setup-uv.outputs.cache-hit != 'true'
run: uv sync
- name: pytest
run: |
set +e
CPUS=$(nproc --all)
OUTPUT=$(uv run pytest --cov-report xml --cov=. --cov-fail-under 80 --durations 10 -n $CPUS)
STATUS=$?
echo "$OUTPUT"
cd ..
codecov
exit $STATUS
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres
CACHE_URL: redis://localhost:6379/0
CELERY_BROKER_URL: redis://redis:6379/1
CELERY_RESULT_BACKEND: redis://redis:6379/2
STRIPE_SECRET_API_KEY: fake-key
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
MEDIA_FILES_STORAGE_BACKEND: django.core.files.storage.FileSystemStorage
STRIPE_SUBSCRIPTION_PRICE_ID: ""
STRIPE_WEBHOOK_SIGNATURE_SECRET: ""