-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (64 loc) · 1.91 KB
/
django.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
65
66
67
68
69
name: Django CI
on:
push:
branches:
- '**'
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
test:
strategy:
matrix:
include:
- python: '3.10'
wagtail: 'wagtail<5.2'
- python: '3.11'
wagtail: 'wagtail<5.2'
- python: '3.10'
wagtail: 'wagtail<5.1'
- python: '3.11'
wagtail: 'wagtail<5.1'
- python: '3.10'
wagtail: 'wagtail<4.3'
- python: '3.11'
wagtail: 'wagtail<4.3'
runs-on: 'ubuntu-latest'
services:
postgres:
image: postgres
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
if: |
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') ||
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
steps:
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
cd wagtailtables_demo && pip install -r requirements.txt
pip install "psycopg2>=2.6"
pip install "${{ matrix.wagtail }}"
- name: Run migrations
run: cd wagtailtables_demo && python manage.py migrate