Skip to content

Commit 666891a

Browse files
committed
ci: switch to hatch fmt and hatch run types:check
1 parent 8f3a726 commit 666891a

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/python-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ concurrency:
1313
env:
1414
PYTHONUNBUFFERED: "1"
1515
FORCE_COLOR: "1"
16+
HATCH_VERSION: "1.14.1"
1617

1718
jobs:
1819
test:
@@ -39,15 +40,20 @@ jobs:
3940
cache: "pip"
4041

4142
- name: Install Hatch
42-
run: pip install --user --upgrade hatch
43+
uses: pypa/hatch@install
44+
with:
45+
version: "${{ env.HATCH_VERSION }}"
4346

4447
- name: Run type check
4548
run: hatch run types:check
4649

50+
- name: Run formatter
51+
run: hatch fmt
52+
4753
- name: Run pre-commit
4854
run: hatch run pre-commit run --all
4955
env:
50-
SKIP: nitpick
56+
SKIP: nitpick,hatch-fmt,hatch-types
5157

5258
- name: Run tests
5359
run: hatch test --python ${{ matrix.python-version }} --cover --randomize --retries 2 --retry-delay 1

.pre-commit-config.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,16 @@ repos:
7777
- id: commitizen
7878
- repo: local
7979
hooks:
80-
- id: mypy
81-
exclude: tests/.*
82-
entry: hatch run python3 -m mypy
80+
- id: hatch-fmt
81+
entry: hatch fmt
8382
language: system
84-
name: mypy
83+
name: hatch fmt
84+
types:
85+
- python
86+
- id: hatch-types
87+
entry: hatch run types:check
88+
language: system
89+
name: hatch types
8590
types:
8691
- python
8792
- repo: https://github.com/andreoliwa/nitpick

0 commit comments

Comments
 (0)