Skip to content

Commit 286d20c

Browse files
committed
Add CI workflow for code style checks using Ruff and Mypy
1 parent cf3e4b4 commit 286d20c

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/github-ci.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths-ignore:
7+
- '**/*.md'
8+
- '**/*.rst'
9+
pull_request:
10+
branches: [ main ]
11+
paths-ignore:
12+
- '**/*.md'
13+
- '**/*.rst'
14+
workflow_dispatch:
15+
16+
jobs:
17+
codestyle:
18+
name: Check code style issues
19+
runs-on: ubuntu-20.04
20+
21+
steps:
22+
- name: Checkout Code
23+
uses: actions/checkout@v4
24+
with:
25+
submodules: 'recursive'
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.12"
31+
32+
- name: Upgrade pip
33+
run: python -m pip install --upgrade pip
34+
35+
- name: Install hPyT
36+
run: |
37+
python -m pip install .
38+
39+
- name: Install Dependencies
40+
run: |
41+
python -m pip install ruff
42+
python -m pip install mypy
43+
44+
- name: Test and Lint with Ruff
45+
run: |
46+
ruff check .
47+
ruff format --check .
48+
49+
- name: Test with Mypy
50+
run: |
51+
mypy .

0 commit comments

Comments
 (0)