-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 921 Bytes
/
python-app.yml
File metadata and controls
38 lines (30 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: check-commit
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
# Enable caching to speed up subsequent runs
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Set up Python
run: uv python install
- name: Install dependencies
# This will install your project and its dependencies into a virtual env
run: uv sync --all-extras --dev
- name: Run Ruff (Linting & Formatting)
# We use 'uv run' to execute packages installed in the project environment
run: |
uv run ruff check .
uv run ruff format --check .
- name: Run Pytest
run: PYTHONPATH=. uv run pytest