-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.63 KB
/
Copy pathmetricsai-ci.yml
File metadata and controls
65 lines (54 loc) · 1.63 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# .github/workflows/metricsai-ci.yml
#
# CI for the metricsai package (lives in the metricsai/ subdirectory of this
# repo). Scoped via paths so it only runs when metricsai/ or this workflow
# changes — unrelated work in security/, testing/, or repo-root docs does not
# trigger it.
#
# Mirrors the local dev loop documented in metricsai/CLAUDE.md:
# uv run ruff format --check . # formatting
# uv run ruff check . # lint
# uv run pytest # full suite (mock-based, fast)
#
# Everything runs through uv; the working directory is pinned to metricsai/ so
# pyproject.toml / uv.lock resolve from the package root.
name: metricsai CI
on:
push:
branches: [main]
paths:
- 'metricsai/**'
- '.github/workflows/metricsai-ci.yml'
pull_request:
paths:
- 'metricsai/**'
- '.github/workflows/metricsai-ci.yml'
# Read-only: this job only checks out code and runs tests.
permissions:
contents: read
# Don't pile up runs on a fast-moving PR; the latest push wins.
concurrency:
group: metricsai-ci-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: metricsai
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: metricsai/uv.lock
- name: Sync (runtime + dev groups)
run: uv sync --frozen
- name: Format check
run: uv run ruff format --check .
- name: Lint
run: uv run ruff check .
- name: Tests
run: uv run pytest