Skip to content

Commit 04771cf

Browse files
committed
ci: run checks in ci pipeline
1 parent f0a92b0 commit 04771cf

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,21 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
lint:
10+
name: Check code style
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install precommit
15+
run: pip install pre-commit
16+
- name: Check lint
17+
run: pre-commit run ruff-check --all-files
18+
- name: Check format
19+
run: pre-commit run ruff-format --all-files
920
test:
1021
name: CI on python${{ matrix.python }} via ${{ matrix.os }}
1122
runs-on: ${{ matrix.os }}
23+
needs: lint
1224
strategy:
1325
matrix:
1426
include:

.pre-commit-config.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,11 @@ repos:
77
- id: check-yaml
88
- id: end-of-file-fixer
99
- id: trailing-whitespace
10-
- repo: https://github.com/psf/black
11-
rev: 24.4.2
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.12.11
1212
hooks:
13-
- id: black
14-
- repo: https://github.com/pycqa/flake8
15-
rev: 7.0.0
16-
hooks:
17-
- id: flake8
18-
additional_dependencies:
19-
- flake8-bugbear
20-
- flake8-comprehensions
21-
- flake8-simplify
13+
- id: ruff-check
14+
- id: ruff-format
2215
- repo: https://github.com/pre-commit/mirrors-mypy
2316
rev: v1.10.0
2417
hooks:

0 commit comments

Comments
 (0)