Repository navigation
66 lines (50 loc) · 1.56 KB
/
Copy pathpython-app.yml
File metadata and controls
66 lines (50 loc) · 1.56 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
name: Python Application
on:
push:
branches: [ "main" ]
paths:
- "onvif/**"
- "tests/**"
- "examples/**" # to enforce lint and format standard
- "pyproject.toml"
pull_request:
branches: [ "main", "dev" ]
paths:
- "onvif/**"
- "tests/**"
- "examples/**" # to enforce lint and format standard
- "pyproject.toml"
permissions:
contents: read
env:
COVERAGE_FAIL_UNDER: 85 # Will be raised gradually (in percentage)
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install project
run: |
python -m pip install --upgrade pip
pip install ".[dev]"
- name: Check formatting with black
run: black --check .
- name: Check imports order with isort
run: isort --check-only .
- name: Check spelling with codespell
run: codespell .
- name: Lint with pylint
run: pylint .
- name: Type check with mypy
run: mypy .
- name: Test and coverage check with pytest
run: pytest --cov=onvif --cov-fail-under=${{ env.COVERAGE_FAIL_UNDER }} --cov-report=term-missing