-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.96 KB
/
tests.yml
File metadata and controls
64 lines (52 loc) · 1.96 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
# Run lint, format-check, and tests on every push to main and on every PR.
#
# The workflow `name` is "tests" because that's what the README badge
# displays — readers (especially the biology audience) parse "tests
# passing" more readily than "CI passing". Behaviorally, this workflow
# also runs ruff and black (i.e. it's the project's full CI gate, not
# only tests); the slight label overload is intentional.
#
# Local equivalent: `scripts/check.sh` (which expects a local .venv;
# this workflow uses the runner's python directly so it doesn't depend
# on that layout).
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
# Cancel in-flight runs on the same ref when a new commit lands; PRs
# rebased many times in quick succession don't queue up wasted minutes.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install package + dev extras
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Fetch upstream Kikawa Auspice JSONs
# Real-data tests in tests/test_real_data.py and tests/test_cli.py
# skip cleanly when these files are absent. We want them to
# actually run in CI, so fetch the upstream JSONs first.
run: python examples/fetch_auspice_data.py
- name: Build Kikawa titer chart specs
# tests/test_real_data.py also reads the saved Vega-Lite specs
# produced by this script. Ditto for tests/test_cli.py end-to-end.
run: python examples/flu-seqneut-2025to2026_titer_charts.py
- name: Lint (ruff)
run: ruff check .
- name: Format check (black)
run: black --check .
- name: Tests (pytest)
run: pytest tests/