mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-04-17 03:31:07 +00:00
* Remove system check for Django version * Closes #175 * Bump version and amend CHANGELOG * Update with GitHub action CI * Update README with Python and Django versions * Limit Django version to 3.2, inclusively. * Add note on Django constraints to README * Bump minor version * Justified by dropping support for dependency versions * Drop support for Django 2.0-2.1, Python 3.5 * Change CI badge in README to GitHub actions * Add support for Pymemcache for Django 3.2+ * Add Django 3.2 to test matrix * Fix MySQL test_explain * Allow filebased delta leniency in tests * Allow Subquery in finding more Subqueries (Fixes #156) * Reverts #157 with proper fix. The initial problem was due to `django.db.models.expressions.Subquery` allowing both QuerySet and sql.Query to be used. * Fixes Django 3.2 test_subquery and test_invalidate_subquery testing by also checking the lhs * Fix Django 2.2 Subquery having no query attr * Fix filebased test time delta * Fix test_invalidate_having due to new inner_query * The new inner_query replaces subquery for Django 3.2 where subquery is now a boolean. That's why I initially used that TypeError in _get_tables_from_sql. inner_query looks to be a sql.Query * Add PyMemcacheCache to supported cache backends Co-authored-by: Dominik George <nik@naturalnet.de>
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ['3.6', '3.7', '3.8', '3.9']
|
|
django-version: ['2.2', '3.0', '3.1', '3.2']
|
|
|
|
services:
|
|
redis:
|
|
image: redis:6.0
|
|
ports:
|
|
- 6379:6379
|
|
postgres:
|
|
image: postgres
|
|
ports:
|
|
- 5432:5432
|
|
env:
|
|
POSTGRES_USER: cachalot
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: cachalot
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
mysql:
|
|
image: mysql
|
|
env:
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
MYSQL_DATABASE: cachalot
|
|
ports:
|
|
- 3306:3306
|
|
memcached:
|
|
image: memcached
|
|
ports:
|
|
- 11211:11211
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get install -y libmemcached-dev zlib1g-dev
|
|
python -m pip install --upgrade pip
|
|
pip install tox tox-gh-actions coveralls
|
|
- name: Tox Test
|
|
run: tox
|
|
env:
|
|
TOX_TESTENV_PASSENV: POSTGRES_PASSWORD
|
|
POSTGRES_PASSWORD: password
|
|
PYTHON_VER: ${{ matrix.python-version }}
|
|
DJANGO: ${{ matrix.django-version }}
|
|
- name: Coverage (Coveralls)
|
|
if: ${{ success() }}
|
|
run: coveralls --service=github
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|