This repository was archived by the owner on Jul 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (70 loc) · 2.27 KB
/
Copy pathpython-check.yml
File metadata and controls
71 lines (70 loc) · 2.27 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
67
68
69
70
71
name: Run Python linters and tests
on:
pull_request:
paths:
- '**/*.py'
- 'poetry.lock'
- 'pyproject.toml'
- '.github/workflows/python-check.yml'
branches:
- master
- dev
- release/*
jobs:
lint:
name: Run Python linters
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
poetry-version: ["1.8.5"]
steps:
- name: "Checkout"
uses: actions/checkout@v6
- name: "Install Poetry ${{matrix.poetry-version}}"
run: pipx install poetry==${{matrix.poetry-version}}
- name: "Setup Python ${{matrix.python-version}}"
uses: actions/setup-python@v6
with:
python-version: ${{matrix.python-version}}
cache: 'poetry'
- name: "Install dependencies"
run: make install
- name: "Run flake8"
run: make flake
- name: "Run mypy"
run: make mypy
- name: "Run black lint"
run: make black-lint
- name: "Run Poetry check"
run: make poetry-check
test:
name: Run Python tests
runs-on: ${{matrix.os}}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
poetry-version: ["1.8.5"]
browser: ["chromium", "firefox", "webkit"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- name: "Checkout"
uses: actions/checkout@v6
- name: "Install Poetry ${{matrix.poetry-version}}"
run: pipx install poetry==${{matrix.poetry-version}}
- name: "Setup Python ${{matrix.python-version}}"
uses: actions/setup-python@v6
with:
python-version: ${{matrix.python-version}}
cache: "poetry"
- name: Install dependencies
run: make install
- name: "Install ${{matrix.browser}} dependencies"
run: make browser-install browser=${{matrix.browser}}
- name: "Run pytest"
run: make test browser=${{matrix.browser}}
- name: "Upload coverage reports to Codecov"
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' && matrix.browser == 'chromium' && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}