Try start Redis on macos and linux, exclude windows

This commit is contained in:
Alex Root Junior 2021-06-15 00:20:03 +03:00
parent 437aad3da5
commit 4e7a5f9a19

View file

@ -10,14 +10,6 @@ on:
jobs:
build:
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
max-parallel: 9
fail-fast: true
@ -51,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
@ -72,10 +70,16 @@ 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://redis:6379/0
- name: Run tests (without Redis)
if: ${{ matrix.os == 'windows-latest' }}
run: |
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml --redis
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}