-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (37 loc) · 1.1 KB
/
backend-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
name: backend-lint
on: [push]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
name: Lint on ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
# See: https://github.com/actions/setup-python/issues/374
- name: Install dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install --no-interaction
- name: Lint checks
run: |
poetry env use ${{ matrix.python-version }}
poetry run pylint mini_fiction/logic
poetry run flake8 mini_fiction/logic
- name: Type checks
run: |
poetry env use ${{ matrix.python-version }}
poetry run mypy
poetry run pyright