Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 67c2870

Browse files
committedJan 16, 2025·
github: add Static Analysis workflow
1 parent 4923f0e commit 67c2870

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
 

‎.github/workflows/static.yaml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
on:
2+
push:
3+
paths:
4+
- "ignis/**"
5+
- ".github/workflows/static.yaml"
6+
pull_request:
7+
paths:
8+
- "ignis/**"
9+
- ".github/workflows/static.yaml"
10+
11+
name: Static Analysis
12+
jobs:
13+
mypy-check:
14+
name: Mypy
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install system dependencies
24+
run: |
25+
sudo apt update
26+
sudo apt install libcairo2-dev git
27+
28+
- name: Clone Ignis repository
29+
run: |
30+
git clone https://github.com/linkfrg/ignis.git src
31+
32+
- name: Install Python dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
cd src
36+
pip install --no-deps --config-options=setup-args="-Dbuild_gvc=false -Ddependency_check=false" .
37+
pip install -r dev.txt
38+
grep -vE "PyGObject|setuptools" requirements.txt | pip install -r /dev/stdin
39+
cd ..
40+
41+
- name: Run mypy analysis
42+
run: |
43+
mypy
44+
45+
ruff-check:
46+
name: Ruff
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Set up Python
51+
uses: actions/setup-python@v5
52+
with:
53+
python-version: "3.12"
54+
- name: Install Python dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
pip install ruff
58+
59+
- name: Check code
60+
run: ruff check
61+
62+
- name: Check format
63+
run: ruff format --check

0 commit comments

Comments
 (0)
Please sign in to comment.