-
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.25 KB
/
codestyle.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
44
45
46
47
48
name: code-style
on:
push:
branches:
- master
pull_request:
branches:
- develop
- master
jobs:
catalyst-check-codestyle:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8']
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
pip install -U pip
curl -sSL "https://install.python-poetry.org" | python - --version 1.5.1
echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
- name: Set up cache
uses: actions/cache@v2
with:
path: .venv
key: venv-ubuntu-latest-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry run pip install -U pip
poetry install --with codestyle,test,docs
- name: check codestyle
run: |
poetry run catalyst-check-codestyle --line-length 99 `find . -not -path './.venv/*' -name '*.py'`
poetry run doc8 -q --file-encoding utf-8 -- docs