Backport and improvements (#601)

* Backport RedisStorage, deep-linking
* Allow prereleases for aioredis
* Bump dependencies
* Correctly skip Redis tests on Windows
* Reformat tests code and bump Makefile
This commit is contained in:
Alex Root Junior 2021-06-15 01:45:31 +03:00 committed by GitHub
parent 32bc05130f
commit 83d6ab48c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 1004 additions and 327 deletions

View file

@ -43,6 +43,12 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Setup redis
if: ${{ matrix.os != 'windows-latest' }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 6
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
@ -64,7 +70,14 @@ jobs:
run: |
poetry run black --check --diff aiogram tests
- name: Run tests
- name: Run tests (with Redis)
if: ${{ matrix.os != 'windows-latest' }}
run: |
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml --redis redis://localhost:6379/0
- name: Run tests (without Redis)
# Redis can't be used on GitHub Windows Runners
if: ${{ matrix.os == 'windows-latest' }}
run: |
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml