mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 02:52:12 +00:00
Added caching dependencies and black validation
This commit is contained in:
parent
55861cb50d
commit
74bd34b1a5
1 changed files with 16 additions and 4 deletions
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
max-parallel: 6
|
||||
fail-fast: false
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
|
@ -35,18 +35,30 @@ jobs:
|
|||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1.1.4
|
||||
with:
|
||||
virtualenvs-create: false
|
||||
virtualenvs-in-project: false
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
|
||||
- name: Load cached venv
|
||||
id: cached-poetry-dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- name: Project dependencies
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
poetry install
|
||||
poetry install --no-interaction
|
||||
|
||||
- name: Lint code
|
||||
run: |
|
||||
poetry run flake8 aiogram
|
||||
poetry run mypy aiogram
|
||||
|
||||
- name: Check code-style (Black)
|
||||
run: |
|
||||
poetry run black --check --diff aiogram tests
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue