Skip to content

Commit 0abffa9

Browse files
committed
Add Github Actions config
1 parent 78712d7 commit 0abffa9

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.github/workflows/test.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
9+
# Current configuration:
10+
# - django 3.2, python 3.8, wagtail 4.1, postgres
11+
# - django 4.0, python 3.9, wagtail 4.2, sqlite
12+
# - django 4.1, python 3.10, wagtail 5.0, postgres
13+
# - django 4.2, python 3.11, wagtail 5.1, sqlite
14+
# - django 3.2, python 3.10, wagtail main, sqlite (allow failures)
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
continue-on-error: ${{ matrix.experimental }}
19+
strategy:
20+
matrix:
21+
include:
22+
- python: "3.8"
23+
django: "Django>=3.2,<4.0"
24+
wagtail: "wagtail>=4.1,<4.2"
25+
database: "postgresql"
26+
experimental: false
27+
- python: "3.9"
28+
django: "Django>=4.0,<4.1"
29+
wagtail: "wagtail>=4.2,<5.0"
30+
database: "sqlite3"
31+
experimental: false
32+
- python: "3.10"
33+
django: "Django>=4.1,<4.2"
34+
wagtail: "wagtail>=5.0,<5.1"
35+
database: "postgresql"
36+
experimental: false
37+
- python: "3.11"
38+
django: "Django>=4.2,<4.3"
39+
wagtail: "wagtail>=5.1,<5.2"
40+
database: "sqlite3"
41+
experimental: false
42+
43+
- python: "3.11"
44+
django: "Django>=4.1,<4.2"
45+
wagtail: "git+https://github.com/wagtail/wagtail.git@main#egg=wagtail"
46+
database: "sqlite3"
47+
experimental: true
48+
49+
services:
50+
postgres:
51+
image: postgres:14
52+
env:
53+
POSTGRES_PASSWORD: postgres
54+
ports:
55+
- 5432:5432
56+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
57+
58+
steps:
59+
- uses: actions/checkout@v3
60+
- name: Set up Python ${{ matrix.python }}
61+
uses: actions/setup-python@v4
62+
with:
63+
python-version: ${{ matrix.python }}
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
pip install "psycopg2>=2.9.3"
68+
pip install "${{ matrix.django }}"
69+
pip install "${{ matrix.wagtail }}"
70+
pip install -e .[testing]
71+
- name: Test
72+
run: python ./setup.py test
73+
env:
74+
DATABASE_ENGINE: django.db.backends.${{ matrix.database }}
75+
DATABASE_HOST: localhost
76+
DATABASE_USER: postgres
77+
DATABASE_PASS: postgres

0 commit comments

Comments
 (0)