-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.14 KB
/
code_quality_checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
name: code quality
on:
push:
branches: [main, development]
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install poetry
uses: snok/[email protected]
with:
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 }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Check style with flake8 & pylint
run: |
poetry run flake8 deepa2/ tests/
poetry run pylint deepa2/
- name: Check format with black
run: poetry run black --check deepa2/ tests/
- name: Check type hinting with mypy
run: poetry run mypy deepa2/