Skip to content

change CI to >=4.1

change CI to >=4.1 #30

Workflow file for this run

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>=4.1'
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