mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 19:00:23 +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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 6
|
max-parallel: 6
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
|
|
@ -35,18 +35,30 @@ jobs:
|
||||||
- name: Install and configure Poetry
|
- name: Install and configure Poetry
|
||||||
uses: snok/install-poetry@v1.1.4
|
uses: snok/install-poetry@v1.1.4
|
||||||
with:
|
with:
|
||||||
virtualenvs-create: false
|
virtualenvs-create: true
|
||||||
virtualenvs-in-project: false
|
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
|
- name: Project dependencies
|
||||||
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
poetry install
|
poetry install --no-interaction
|
||||||
|
|
||||||
- name: Lint code
|
- name: Lint code
|
||||||
run: |
|
run: |
|
||||||
poetry run flake8 aiogram
|
poetry run flake8 aiogram
|
||||||
poetry run mypy aiogram
|
poetry run mypy aiogram
|
||||||
|
|
||||||
|
- name: Check code-style (Black)
|
||||||
|
run: |
|
||||||
|
poetry run black --check --diff aiogram tests
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml
|
poetry run pytest --cov=aiogram --cov-config .coveragerc --cov-report=xml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue