Skip to content

[INT-953] implemented #101

[INT-953] implemented

[INT-953] implemented #101

Workflow file for this run

name: Python tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test_with_redis:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
redis-version: [4.5.5]
steps:
- uses: actions/checkout@v2
- name: Install redis
run: sudo apt-get install redis-server
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install common dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements-test.txt
- name: Install redis
run: |
pip install "redis==${{ matrix.redis-version }}"
- name: Install yatq
run: |
pip install .
- name: Test with pytest
run: |
pytest
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install mypy
- name: Install yatq
run: |
pip install .
- name: Check type annotations with mypy
run: |
mypy yatq
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install black
- name: Check codestyle with black
run: |
black --check yatq
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install isort
- name: Check codestyle with isort
run: |
isort --check yatq --profile=black
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install redis
run: sudo apt-get install redis-server
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements-test.txt pytest-cov
- name: Install yatq
run: |
pip install .
- name: Test with pytest
run: |
pytest --cov yatq --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml