-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (42 loc) · 1.15 KB
/
python-code-checks.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
43
44
45
46
name: Python code checks
on:
push:
branches:
- "**"
pull_request:
branches:
- master
workflow_dispatch:
jobs:
check_python_code:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
name: Running Python code checks with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pipenv"
- name: Install pipenv
run: |
python -m pip install --upgrade pip pipenv
python --version; python -m pip --version; pipenv --version
- name: Setup project with pipenv
run: |
pipenv --python ${{ matrix.python-version }} install --dev
- name: Check code style
run: |
pipenv run format_check
- name: Check import order
run: |
pipenv run isort_check
- name: Lint with pylint
run: |
pipenv run lint_check
- name: Run unit tests
run: |
pipenv run test