-
Notifications
You must be signed in to change notification settings - Fork 32
63 lines (55 loc) · 1.6 KB
/
static.yaml
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
on:
push:
paths:
- "ignis/**"
- ".github/workflows/static.yaml"
pull_request:
paths:
- "ignis/**"
- ".github/workflows/static.yaml"
name: Static Analysis
jobs:
mypy-check:
name: Mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system dependencies
run: |
sudo apt update
sudo apt install libcairo2-dev git
- name: Clone Ignis repository
run: |
git clone https://github.com/linkfrg/ignis.git src
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
cd src
pip install --no-deps --config-settings=setup-args="-Dbuild_gvc=false" --config-settings=setup-args="-Ddependency_check=false" .
pip install -r dev.txt
grep -vE "PyGObject|setuptools" requirements.txt | pip install -r /dev/stdin
cd ..
- name: Run mypy analysis
run: |
MYPYPATH=./ignis mypy --explicit-package-bases ./ignis
ruff-check:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Check code
run: ruff check
- name: Check format
run: ruff format --check