mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 10:53:23 +00:00
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev-3.x
|
|
pull_request:
|
|
branches:
|
|
- dev-3.x
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
max-parallel: 6
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
python-version:
|
|
- 3.7
|
|
- 3.8
|
|
- 3.9
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: System dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
|
|
|
- name: Project dependencies
|
|
run: |
|
|
poetry install
|
|
|
|
- name: Lint code
|
|
run: |
|
|
poetry run flake8 aiogram
|
|
poetry run mypy aiogram
|
|
|
|
- name: Run tests
|
|
run: |
|
|
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml
|
|
|
|
- uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: coverage.xml
|
|
flags: unittests
|
|
name: py-${{ matrix.python-version }}-${{ matrix.os }}
|
|
fail_ci_if_error: true
|