-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (42 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
42 lines (42 loc) · 1.9 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
name: ci
on:
# EVERY branch, not just main. With `branches: [main]` a feature branch was
# never tested until someone opened a PR, so 53 commits across three pushed
# branches reached `main`'s doorstep having run on one developer machine and
# nothing else — and the first PR failed on all five pythons, twice over, for
# two faults that were invisible locally: a test reading a saved config from
# the developer's home directory, and an assertion on rich output that only
# holds when colour is off.
push:
branches: ['**']
# kept alongside `push`, for pull requests from FORKS: their commits never
# land in this repo, so the push trigger above cannot see them. On a
# same-repo PR both fire and the suite runs twice. That is deliberate —
# roughly three runner-minutes against the alternatives, which are either
# dropping fork coverage or a job-level `if` on the head repository whose
# interaction with required checks cannot be verified from here.
pull_request:
concurrency:
# `github.ref` and not the branch name: a push is `refs/heads/x` while its
# pull_request is `refs/pull/N/merge`, so the two keep separate groups. Were
# they shared, a push and its PR event would race and cancel one another —
# leaving a required check stuck at "cancelled" on the PR.
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# [dev] only, on purpose: docling/playwright/torch stay out of CI so the
# suite keeps running without network, model downloads or a browser.
- run: pip install -e ".[dev]"
- run: ruff check src tests scripts evals
- run: pytest -q