Skip to content

Commit 6f8894d

Browse files
committed
Add linting action
1 parent fd911ef commit 6f8894d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/lint.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.10"
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: ~/.local
22+
key: poetry-1.2.2
23+
24+
- uses: snok/install-poetry@v1
25+
with:
26+
version: 1.2.2
27+
virtualenvs-create: true
28+
virtualenvs-in-project: true
29+
30+
- uses: actions/cache@v2
31+
id: cache-deps
32+
with:
33+
path: .venv
34+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
35+
36+
- run: poetry install --no-interaction --no-root
37+
if: steps.cache-deps.outputs.cache-hit != 'true'
38+
39+
- run: poetry install --no-interaction
40+
41+
- run: poetry run flake8 tinylink tests
42+
43+
- run: poetry run black --check --diff tinylink tests
44+
45+
- run: poetry run isort --check --diff tinylink tests

0 commit comments

Comments
 (0)