Skip to content

Commit

Permalink
Added caching dependencies and black validation
Browse files Browse the repository at this point in the history
  • Loading branch information
JrooTJunior committed May 12, 2021
1 parent 55861cb commit 74bd34b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 6
fail-fast: false
fail-fast: true
matrix:
os:
- ubuntu-latest
Expand All @@ -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
Expand Down

0 comments on commit 74bd34b

Please sign in to comment.