|
| 1 | +name: Testing taskiq-redis |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +jobs: |
| 6 | + black: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v2 |
| 10 | + - name: Set up Python |
| 11 | + uses: actions/setup-python@v2 |
| 12 | + with: |
| 13 | + python-version: "3.9" |
| 14 | + - name: Install deps |
| 15 | + uses: knowsuchagency/poetry-install@v1 |
| 16 | + env: |
| 17 | + POETRY_VIRTUALENVS_CREATE: false |
| 18 | + - name: Run black check |
| 19 | + run: poetry run black --check . |
| 20 | + flake8: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - name: Set up Python |
| 25 | + uses: actions/setup-python@v2 |
| 26 | + with: |
| 27 | + python-version: "3.9" |
| 28 | + - name: Install deps |
| 29 | + uses: knowsuchagency/poetry-install@v1 |
| 30 | + env: |
| 31 | + POETRY_VIRTUALENVS_CREATE: false |
| 32 | + - name: Run flake8 check |
| 33 | + run: poetry run flake8 --count . |
| 34 | + mypy: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v2 |
| 38 | + - name: Set up Python |
| 39 | + uses: actions/setup-python@v2 |
| 40 | + with: |
| 41 | + python-version: "3.9" |
| 42 | + - name: Install deps |
| 43 | + uses: knowsuchagency/poetry-install@v1 |
| 44 | + env: |
| 45 | + POETRY_VIRTUALENVS_CREATE: false |
| 46 | + - name: Run mypy check |
| 47 | + run: poetry run mypy . |
| 48 | + pytest: |
| 49 | + services: |
| 50 | + redis: |
| 51 | + image: bitnami/redis:6.2.5 |
| 52 | + env: |
| 53 | + ALLOW_EMPTY_PASSWORD: "yes" |
| 54 | + options: >- |
| 55 | + --health-cmd="redis-cli ping" |
| 56 | + --health-interval=5s |
| 57 | + --health-timeout=5s |
| 58 | + --health-retries=30 |
| 59 | + ports: |
| 60 | + - 6379:6379 |
| 61 | + strategy: |
| 62 | + matrix: |
| 63 | + py_version: ["3.7", "3.8", "3.9", "3.10"] |
| 64 | + runs-on: "ubuntu-latest" |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v2 |
| 67 | + - name: Set up Python |
| 68 | + uses: actions/setup-python@v2 |
| 69 | + with: |
| 70 | + python-version: "${{ matrix.py_version }}" |
| 71 | + - name: Update pip |
| 72 | + run: python -m pip install -U pip |
| 73 | + - name: Install poetry |
| 74 | + run: python -m pip install poetry |
| 75 | + - name: Install deps |
| 76 | + run: poetry install |
| 77 | + env: |
| 78 | + POETRY_VIRTUALENVS_CREATE: false |
| 79 | + - name: Run pytest check |
| 80 | + run: poetry run pytest -vv -n auto --cov="taskiq_redis" . |
0 commit comments