-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3241a5f
commit 88c9ecd
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Pre-commit checks | ||
on: | ||
pull_request: | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
- name: Install pre-commit globally | ||
run: uv tool install pre-commit --with pre-commit-uv --force | ||
- name: Run pre-commit hooks | ||
env: | ||
SKIP: no-commit-to-branch # Skip the main branch protection hook in CI | ||
run: pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Pytest | ||
on: | ||
pull_request: | ||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: ".python-version" | ||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
- name: Run tests | ||
run: uv run pytest tests |