Repository navigation
62 lines (55 loc) · 1.82 KB
/
Copy pathpython-app.yml
File metadata and controls
62 lines (55 loc) · 1.82 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
# This workflow will install Python dependencies, run lint and tests.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
pip install ruff mypy
- name: Lint with ruff
run: |
ruff check absbox
- name: Test with pytest
run: |
python -m pytest absbox/tests
# Static-analysis advisories (#51): surface mypy/pyright findings as inline PR
# annotations from the workflow log (GitHub parses `::error`/`::warning`,
# `::notice` lines). `continue-on-error` keeps them strictly informative.
analysis-advisory:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: mypy (advisory, inline PR annotations)
run: |
python -m mypy 2>&1 | tee /tmp/mypy.log || true
python tools/annotate_from_log.py /tmp/mypy.log mypy || true
- name: Pyright (basic mode via pyrightconfig.json, advisory)
run: |
pip install pyright
pyright 2>&1 | tee /tmp/pyright.log || true
python tools/annotate_from_log.py /tmp/pyright.log pyright || true