Spaces:
Running
Running
Commit
·
572b569
1
Parent(s):
2457ae0
ci: add GitHub Actions workflow for CI/CD
Browse filesRuns on push/PR to main and dev branches:
- Lint with ruff
- Type check with mypy
- Run unit tests with pytest
Uses uv for fast dependency installation.
- .github/workflows/ci.yml +34 -0
.github/workflows/ci.yml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: CI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [main, dev]
|
| 6 |
+
pull_request:
|
| 7 |
+
branches: [main, dev]
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
check:
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
|
| 13 |
+
steps:
|
| 14 |
+
- uses: actions/checkout@v4
|
| 15 |
+
|
| 16 |
+
- name: Install uv
|
| 17 |
+
uses: astral-sh/setup-uv@v4
|
| 18 |
+
with:
|
| 19 |
+
version: "latest"
|
| 20 |
+
|
| 21 |
+
- name: Set up Python 3.11
|
| 22 |
+
run: uv python install 3.11
|
| 23 |
+
|
| 24 |
+
- name: Install dependencies
|
| 25 |
+
run: uv sync --all-extras
|
| 26 |
+
|
| 27 |
+
- name: Lint with ruff
|
| 28 |
+
run: uv run ruff check src tests
|
| 29 |
+
|
| 30 |
+
- name: Type check with mypy
|
| 31 |
+
run: uv run mypy src
|
| 32 |
+
|
| 33 |
+
- name: Run tests
|
| 34 |
+
run: uv run pytest tests/unit/ -v
|