mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Try start Redis on macos and linux, exclude windows
This commit is contained in:
parent
437aad3da5
commit
4e7a5f9a19
1 changed files with 13 additions and 9 deletions
22
.github/workflows/tests.yml
vendored
22
.github/workflows/tests.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue