-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (51 loc) · 1.52 KB
/
lint.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
name: Lint
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Cache poetry installer
uses: actions/cache@v3
id: cache-poetry-installer
env:
cache-name: cache-poetry-installer
with:
path: "~/poetry_installer"
key: "1.1.8"
- name: Download poetry installer
if: steps.cache-poetry-installer.outputs.cache-hit != 'true'
run: |
echo
mkdir ~/poetry_installer
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py > ~/poetry_installer/install-poetry.py
- name: Install poetry (api)
run: |
cd ~/poetry_installer
python install-poetry.py --version 1.1.8
poetry config virtualenvs.create true
poetry config virtualenvs.in-project false
# poetry cache folder: /home/runner/.cache/pypoetry
- name: Cache poetry
uses: actions/cache@v3
env:
cache-name: cache-poetry
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-cache-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-cache-
- name: Install python dependencies
run: |
poetry install
- name: Lint
run: |
poetry run pylint --rcfile=.pylintrc pycffdrs/*.py tests/*.py;