-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (57 loc) · 1.63 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django: ["3.2", "4.0", "4.1", "4.2", "5.0"]
exclude:
- python: "3.11"
django: "3.2"
- python: "3.12"
django: "3.2"
- python: "3.11"
django: "4.0"
- python: "3.12"
django: "4.0"
- python: "3.8"
django: "5.0"
- python: "3.9"
django: "5.0"
database_url:
- postgres://runner:password@localhost/project
- mysql://root:[email protected]/project
- 'sqlite:///:memory:'
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_DB: project
POSTGRES_USER: runner
POSTGRES_PASSWORD: password
env:
DATABASE_URL: ${{ matrix.database_url }}
steps:
- name: Start MySQL
run: sudo systemctl start mysql.service
- uses: actions/checkout@v2
- name: Install system Python build deps for psycopg2
run: sudo apt-get install python3-dev python3.11-dev
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Upgraded pip
run: pip install --upgrade pip
- name: Install dependencies
run: pip install -r test-requirements.txt
- name: Install Django
run: pip install -U django==${{ matrix.django }}
- name: Run tests
run: python manage.py test
- name: Run black
run: black --check django_dbq