Skip to content

Commit ebce7f2

Browse files
committed
Migrate to prek + add gh workflow
1 parent 1e56b25 commit ebce7f2

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/prek.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Prek checks
2+
on: [push, pull_request]
3+
4+
jobs:
5+
prek:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v6
9+
- uses: j178/prek-action@v2

docs/contribute.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ One of the best ways is follow [maturin offical documentation](https://www.matur
2222
```bash
2323
> python3 -m venv .venv
2424
> source .venv/bin/activate
25-
> pip install -U pip maturin pre-commit pytest pytest-anyio pydantic pgpq
25+
> pip install -U pip maturin prek pytest pytest-anyio pydantic pgpq
2626
```
2727

2828
Then you need to build `PSQLPy` project.
@@ -33,12 +33,12 @@ maturin develop
3333
After this step project is built and installed in your python environment you created in previous step.
3434

3535
## Linting and type checking
36-
We have pre-commit configured with all our settings. We highly recommend you to install it as a git hook using pre-commit install command.
36+
We have prek configured with all our settings. We highly recommend you to install it as a git hook using prek install command.
3737

3838
But even without installation, you can run all lints manually:
3939

4040
```bash
41-
pre-commit run -a
41+
prek run -a
4242
```
4343

4444
## Testing

psqlpy-stress/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ piccolo = "^1.12.0"
2626

2727

2828
[tool.poetry.group.dev.dependencies]
29-
pre-commit = "*"
29+
prek = "*"
3030
mypy = "*"
3131
ruff = "*"
3232

0 commit comments

Comments
 (0)