[fix] Mail de rappel sur projet en pause #3774
This file contains 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: Django Tests CI | |
on: | |
push: | |
branches: ['main', 'develop', 'release/*', 'feature/*'] | |
pull_request: | |
branches: ['main', 'develop', 'release/*'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres:16 | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: uv_ci | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
steps: | |
- name: Check out repository code | |
uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: "pyproject.toml" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup Pre-commit | |
uses: pre-commit/[email protected] | |
- name: Run Pre-commit checks | |
uses: pre-commit-ci/[email protected] | |
if: always() | |
- uses: borales/[email protected] | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install python3-gdal pandoc | |
- name: Install uv and python | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Compile JS | |
working-directory: ./recoco/frontend | |
run: | | |
yarn install | |
yarn build | |
- name: Install Dependencies | |
run: | | |
uv sync --no-dev | |
uv sync --only-dev | |
- name: Configure | |
run: | | |
cp recoco/settings/development.py.example recoco/settings/development.py | |
- name: Run Tests | |
env: | |
SECRET_KEY: 'this-is-not-a-secret-key' | |
SENDINBLUE_API_KEY: 'this-is-a-fake-api-key' | |
DJANGO_DB_HOST: localhost | |
DJANGO_DB_USER: postgres | |
DJANGO_DB_PASSWORD: postgres | |
DJANGO_DB_NAME: uv_ci | |
DJANGO_DB_PORT: 5432 | |
DJANGO_DB_ENGINE: django.db.backends.postgresql | |
run: | | |
uv run pytest --create-db |