-
Notifications
You must be signed in to change notification settings - Fork 70
55 lines (53 loc) · 1.72 KB
/
Copy pathci-main.yml
File metadata and controls
55 lines (53 loc) · 1.72 KB
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
48
49
50
51
52
53
54
55
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