Ajout d'une version conditionnelle des pages lors du chargement en iframe #1865
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: 🔮 CI - Main checks | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DJANGO_SETTINGS_MODULE: config.settings_test | |
| strategy: | |
| matrix: | |
| # Only include the first and last supported Python versions, as well as | |
| # the one that is pinned in the .python-version file | |
| # (which should be the default one on Scalingo, per | |
| # https://doc.scalingo.com/languages/python/start ) | |
| python-version: ["3.12", "3.13", "3.14"] | |
| # Only include the first and last supported pgsql versions to limit | |
| # the number of jobs | |
| postgresql-version: [14, 17] | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgresql-version }}-alpine | |
| env: | |
| POSTGRES_USER: dju | |
| POSTGRES_PASSWORD: djpwd | |
| POSTGRES_DB: djdb | |
| POSTGRESQL_VERSION: ${{ matrix.postgresql-version }} | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 📔 Install just | |
| uses: extractions/setup-just@v2 | |
| - name: 🐍 Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: 🐍 Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: 🌍 Install dependencies | |
| run: | | |
| uv sync --no-group dev | |
| - name: 📄 Copy empty .env.test to .env | |
| run: | | |
| cp .env.test .env | |
| - name: 💾 Collect static files | |
| run: | | |
| just collectstatic | |
| - name: 🤹 Run the unit tests | |
| run: | | |
| just unittest | |
| - name: 🎨 Deploy starter content | |
| run: | | |
| just init | |
| uv run python manage.py create_demo_pages | |
| integration-s3: | |
| runs-on: ubuntu-latest | |
| env: | |
| DJANGO_SETTINGS_MODULE: config.settings_s3_test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 📔 Install just | |
| uses: extractions/setup-just@v2 | |
| - name: 🐍 Set up Python 3.13 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| - name: 🐍 Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: 🌍 Install dependencies | |
| run: | | |
| uv sync --no-group dev | |
| - name: 📄 Copy empty .env.test to .env | |
| run: | | |
| cp .env.test .env | |
| - name: 🐳 Start Garage cluster | |
| run: | | |
| docker compose up -d garage | |
| echo "Waiting for Garage to be ready..." | |
| sleep 5 | |
| docker compose logs garage | |
| - name: 🤹 Run S3 integration tests | |
| env: | |
| GARAGE_INTEGRATION_TESTS: "1" | |
| S3_HOST: garage:3900 | |
| S3_KEY_ID: GKarageKEY00000000000000000 | |
| # Set S3_KEY_SECRET from the Garage credentials in docker-compose.yml | |
| # (GARAGE_DEFAULT_SECRET_KEY). Not a real secret — it's a dev key. | |
| S3_KEY_SECRET: GKarag... | |
| S3_BUCKET_NAME: sites-conformes-media | |
| S3_BUCKET_REGION: fr | |
| S3_PROTOCOL: http | |
| run: | | |
| uv run python manage.py test \ | |
| sites_conformes.core.tests.test_s3_integration |