forked from numerique-gouv/sites-faciles
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.22 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: 🔮 CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: config.settings_test
PYTHONPATH: .
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_USER: dju
POSTGRES_PASSWORD: djpwd
POSTGRES_DB: djdb
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: 🌍 Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --no-root
- name: 📄 Copy empty .env.test to .env
run: |
cp .env.test .env
- name: ✨ Black, isort, flake8 & djlint
run: |
make quality
- name: 🚧 Check pending migrations
run: |
poetry run django-admin makemigrations --check --dry-run --noinput
- name: 🤹 Run the unit tests
run: |
make test-unit
env:
DJANGO_DEBUG: True