-
Notifications
You must be signed in to change notification settings - Fork 15
56 lines (45 loc) · 1.26 KB
/
lint-test.yml
File metadata and controls
56 lines (45 loc) · 1.26 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
name: Linting and Test
on:
pull_request:
paths:
- "app/**"
jobs:
lint:
name: Lint with Flake8
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11.9"
- name: Install Lint Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==7.1.1 flake8_black==0.3.6
- name: Run flake8
run: |
flake8 --max-line-length=119 \
--ignore=E722,I201,I100,BLK100,W503 \
--per-file-ignores=__init__.py:F401 \
app/*.py
unit-test:
name: Run Unit Tests
runs-on: ubuntu-latest
env:
UV_SYSTEM_PYTHON: 1
PYTHONPATH: ${{ github.workspace }}
TESTING_MODE: "true"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run Pytest
run: |
uv run pytest --cov=app --cov-report=term-missing --cov-fail-under=80 tests/