Update doc conf #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: true | |
MYSQL_ROOT_PASSWORD: "" | |
MYSQL_DATABASE: machina_test | |
ports: | |
- 3307:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: machina_test | |
ports: | |
- 5432:5432 | |
# Needed because the postgres container does not provide a healthcheck | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ | |
3.7, | |
3.8, | |
3.9, | |
'3.10', | |
'3.11', | |
] | |
django-version: [ | |
"django>=3.2,<4.0", | |
"django>=4.0,<4.1", | |
"django>=4.1,<4.2", | |
"django>=4.2,<5.0", | |
] | |
db: [ | |
'mysql', | |
'postgres', | |
'sqlite', | |
] | |
exclude: | |
- python-version: 3.7 | |
django-version: "django>=4.0,<4.1" | |
- python-version: 3.7 | |
django-version: "django>=4.1,<4.2" | |
- python-version: 3.7 | |
django-version: "django>=4.2,<5.0" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Start MySQL if applicable | |
if: matrix.db == 'mysql' | |
run: | | |
sudo /etc/init.d/mysql start | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U pip poetry | |
poetry install | |
poetry run pip install psycopg2 mysqlclient | |
poetry run pip install --pre -U "${{ matrix.django-version }}" "git+https://github.com/django-haystack/django-haystack.git" | |
- name: Run QA checks | |
run: make qa | |
- name: Run tests suite | |
run: poetry run pytest | |
env: | |
DB: ${{ matrix.db }} |