-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (38 loc) · 1.08 KB
/
code-quality.yml
File metadata and controls
45 lines (38 loc) · 1.08 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
name: Code quality
on:
pull_request:
branches:
- main
- master
- develop
push:
branches:
- main
- master
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-codequality-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-codequality-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e ".[dev]"
- name: Run Black (format check)
run: black --check --diff signnow/ tests/ examples/ run_examples.py
- name: Run Flake8
run: flake8 signnow/ tests/ examples/ run_examples.py --max-line-length=88 --extend-ignore=E203,W503,E501