-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.03 KB
/
main.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: Code quality check and endpoint test workflow
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Pulling the latest code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.10.5'
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.1.12-0
- name: Install poetry dependency management
uses: snok/install-poetry@v1
with:
versions: 1.1.12
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- run: poetry install --no-root
- name: Sort all imports according to PEP8 and Flake8
run: poetry run isort .
- name: Format code with black
run: poetry run black .