mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
54 lines
1.2 KiB
YAML
54 lines
1.2 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
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
python-version:
|
|
- 3.7
|
|
- 3.8
|
|
|
|
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: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip poetry==1.0
|
|
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
|
|
yml: codecov.yml
|
|
name: py-${{ matrix.python-version }}-${{ matrix.os }}
|
|
fail_ci_if_error: true
|