forked from dbfixtures/pytest-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (89 loc) · 2.38 KB
/
linters.yml
File metadata and controls
97 lines (89 loc) · 2.38 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Run linters
on:
push:
branches: [ main ]
paths:
- '**.py'
- .github/workflows/linters.yml
- requirements-lint.txt
pull_request:
branches: [ main ]
jobs:
pydocstyle:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run pydocstyle
run: |
pydocstyle src/ tests/
flake8:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run flake8
run: |
flake8 src/ tests/
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: psf/black@21.7b0
imports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
- name: Check if the code can be imported without psycopg
run: |
python -c "import pytest_postgresql"
python -c "import pytest_postgresql.plugin"
python -c "import pytest_postgresql.factories"
python -c "import pytest_postgresql.factories.client"
python -c "import pytest_postgresql.factories.noprocess"
python -c "import pytest_postgresql.factories.process"
python -c "import pytest_postgresql.janitor"
mypy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run mypy check
run: |
mypy src tests