Skip to content

Merge pull request #62 from csizmaziakiki/master #1

Merge pull request #62 from csizmaziakiki/master

Merge pull request #62 from csizmaziakiki/master #1

Workflow file for this run

name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
django-version: ['3.2', '4.0', '4.1', '4.2']
services:
postgres:
image: postgres:12
ports:
- 5432:5432
options: >-
--health-cmd=pg_isready
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
POSTGRES_DB: testdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
mysql:
image: mysql:8
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
MYSQL_USER: travis
MYSQL_PASSWORD: travis
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: test_testdb
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Test versions Python ${{ matrix.python-version }} Django ${{ matrix.django-version }}
shell: bash
run: |
if [[ "${{ matrix.python-version }}" == "3.11" && "${{ matrix.django-version }}" == "3.2" ]]; then
echo "Skipping unsupported Python/Django combination"
exit 0
elif [[ "${{ matrix.python-version }}" == "3.11" && "${{ matrix.django-version }}" == "4.0" ]]; then
echo "Skipping unsupported Python/Django combination"
exit 0
fi
pip install Django==${{ matrix.django-version }} mysqlclient psycopg2
pip install flake8 pylint pytest pytest-django
pip install -e .
python setup.py test
./lint.sh