Skip to content

Ajout de la configuration CI #1

Ajout de la configuration CI

Ajout de la configuration CI #1

Workflow file for this run

name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.11, 3.12]
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: gsl
POSTGRES_USER: gsl_team
POSTGRES_PASSWORD: gsl_pass
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
DB_HOST: localhost
DB_NAME: gsl
DB_USER: gsl_team
DB_PASSWORD: gsl_pass
DB_PORT: 5432
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run Tests
run: |
python -m pytest