-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (46 loc) · 1.52 KB
/
python-lint.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
49
50
51
52
53
54
55
56
57
58
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Ferry@CourseTable
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install system dependencies
run: sudo apt-get -y install graphviz libgraphviz-dev
- name: Install poetry
uses: snok/[email protected]
with:
version: 1.1.4
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached dependencies
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Python dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Lint with black
run: |
poetry run black --check ./ferry
- name: Lint with isort
run: |
poetry run isort --check-only --diff ./ferry
- name: Lint with pylint
run: |
poetry run pylint ./ferry
- name: Type checking with mypy
run: |
poetry run mypy ferry