generated from zhanymkanov/fastapi_production_template
-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (40 loc) · 942 Bytes
/
linters.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
name: Run linter checks
on:
pull_request:
branches:
- '**'
jobs:
run_linters_tests:
name: Run linters and tests
runs-on: ubuntu-latest
container: python:3.10.7
services:
postgres:
image: postgres:14.1
env:
POSTGRES_PASSWORD: app
POSTGRES_USER: app
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install -r requirements/dev.txt
continue-on-error: true
- name: Lint with ruff
run: |
ruff src
- name: Format with ruff
run: |
ruff format src --diff
# - name: Lint with mypy
# run: |
# mypy src tests
# - name: Run tests
# run: |
# pytest