-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (56 loc) · 1.59 KB
/
code-quality.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: code quality
on:
pull_request:
branches:
- main
jobs:
code-quality:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [3.8]
env:
PYTHONPATH: .
steps:
- name: setup python
id: setup
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: checkout
id: checkout
uses: actions/checkout@v2
- name: setup environment
id: env
run: |
sudo ln -fs /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
sudo ln -fs /usr/share/zoneinfo/Europe/Stockholm /etc/timezone
echo $HOME/.local/bin >> $GITHUB_PATH
- name: cache python environment
id: cache
uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt')}}
- name: install python dependencies
id: pip
run: |
pip install --upgrade wheel
pip install --upgrade --upgrade-strategy eager -r <(cat requirements.txt requirements-dev.txt)
- name: run pytest
id: pytest
run: |
pytest
- name: run coverage
id: coverage
run: |
coverage report --omit=**/*messagequeue*,**/*mq.py --fail-under=95
- name: run pylint
id: pylint
run: |
pylint --jobs=0 --fail-under=10 grizzly/ grizzly_extras/ tests/ example/
- name: run mypy
id: mypy
run: |
mypy grizzly/ grizzly_extras/ tests/ example/