Skip to content

Commit

Permalink
Add CI workflow for code style checks using Ruff and Mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingzy committed Nov 27, 2024
1 parent cf3e4b4 commit 286d20c
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/github-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.rst'
pull_request:
branches: [ main ]
paths-ignore:
- '**/*.md'
- '**/*.rst'
workflow_dispatch:

jobs:
codestyle:
name: Check code style issues
runs-on: ubuntu-20.04

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install hPyT
run: |
python -m pip install .
- name: Install Dependencies
run: |
python -m pip install ruff
python -m pip install mypy
- name: Test and Lint with Ruff
run: |
ruff check .
ruff format --check .
- name: Test with Mypy
run: |
mypy .

0 comments on commit 286d20c

Please sign in to comment.