-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (36 loc) · 896 Bytes
/
ci.yml
File metadata and controls
45 lines (36 loc) · 896 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
39
40
41
42
43
44
name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install dependencies (project + dev)
run: uv sync
- name: Ruff (lint)
run: uv run ruff check src
- name: Black (format check)
run: uv run black --check src
- name: Pytest
run: |
set +e
uv run pytest -q
code=$?
if [ "$code" -eq 0 ] || [ "$code" -eq 5 ]; then
# Exit 0 for success or when no tests collected
exit 0
else
exit "$code"
fi