fix: assurer que tous les query params sont mis dans le success_url d… #3348
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dora Back CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| paths: | |
| - 'back/**' | |
| - '.github/workflows/back-ci.yml' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DJANGO_SETTINGS_MODULE: config.settings.test | |
| DJANGO_SECRET_KEY: foo | |
| DATABASE_URL: postgresql://postgres@localhost:5432/dora | |
| MINIO_SECRET_KEY: minio-secret-key | |
| REDIS_URL: redis://localhost:6379 | |
| AWS_S3_ENDPOINT_URL: http://localhost:9000 | |
| AWS_SECRET_ACCESS_KEY: $MINIO_SECRET_KEY | |
| REQUIREMENTS_PATH: requirements/test.txt # Pas besoin de préciser 'back' ici, car le 'working-directory' sera 'back' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| services: | |
| s3: | |
| image: minio/minio:latest | |
| env: | |
| MINIO_ROOT_USER: minio-access-key | |
| MINIO_ROOT_PASSWORD: $MINIO_SECRET_KEY | |
| ports: | |
| - 9000:9000 | |
| redis: | |
| image: redis:alpine | |
| ports: | |
| - 6379:6379 | |
| postgres: | |
| image: postgis/postgis:16-3.4-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_DB: postgres | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - name: Installation de GDAL et psql | |
| run: sudo apt update && sudo apt install -y gdal-bin postgresql-client | |
| - name: Checkout du projet | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # On spécifie que toutes les étapes suivantes se feront dans le répertoire 'back' | |
| - name: Création de la base de données | |
| working-directory: back | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_DB: postgres | |
| POSTGRES_HOST: localhost | |
| run: | | |
| psql -h $POSTGRES_HOST -U $POSTGRES_USER $POSTGRES_DB <<EOL | |
| DROP DATABASE IF EXISTS dora; | |
| CREATE DATABASE dora; | |
| EOL | |
| - name: Installation de Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| cache-dependency-path: back/$REQUIREMENTS_PATH | |
| - name: Installation des dépendences | |
| working-directory: back | |
| run: pip install -r $REQUIREMENTS_PATH | |
| - name: Vérification de la compilation des sources Python | |
| working-directory: back | |
| run: python -m compileall -q . | |
| - name: Linting et formatage du code Python | |
| working-directory: back | |
| run: | | |
| ruff format --check dora config scripts | |
| ruff check dora config scripts | |
| - name: Vérification Django (check et migrations) | |
| working-directory: back | |
| run: | | |
| ./manage.py check | |
| ./manage.py makemigrations --check --dry-run --noinput | |
| - name: Vérification des fichier HTML et templates | |
| working-directory: back | |
| run: djhtml --tabwidth=2 --check dora config scripts | |
| - name: Tests | |
| working-directory: back | |
| run: pytest |