-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 1.04 KB
/
codestyle.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
---
name: "Coding style"
on: "push"
jobs:
lint:
name: "Linting"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v1"
- name: "Setup Python"
uses: "actions/setup-python@v1"
with:
python-version: '3.7'
- name: "Setup Poetry"
run: |
python -m pip install --upgrade --no-cache-dir pip
python -m pip install --no-cache-dir poetry
- name: "Restore any cached Poetry dependencies"
uses: actions/cache@v1
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: "Install any new dependencies"
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: "Run Black"
run: "poetry run black --check sunportal"
- name: "Run PyDocStyle"
run: "poetry run pydocstyle --explain --add-ignore=D100,D104 --match-dir='(?!migrations).*' sunportal"