This repository was archived by the owner on Aug 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (79 loc) · 2.74 KB
/
Copy pathci.yml
File metadata and controls
84 lines (79 loc) · 2.74 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: uv sync --extra dev --extra all
- name: Ruff
run: uv run ruff check .
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- run: uv sync --extra dev --extra all
- run: uv run mypy src/axonpush
unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --extra dev --extra all
- name: Run unit tests
run: uv run --extra dev --extra all pytest tests/unit -v
# End-user clean-install smoke test. A regular `pip install axonpush`
# ships with NONE of the optional extras — if any module under
# `src/axonpush` top-level-imports an undeclared third-party package
# (e.g. an autogenerated openapi-python-client model importing `attrs`
# without that being declared in `[project].dependencies`), this job
# fails. The dev venv masks this kind of bug because `--extra all`
# pulls everything in transitively.
minimal-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheel
run: |
python -m pip install --upgrade pip build
python -m build --wheel
- name: Install built wheel into a clean venv
run: |
python -m venv /tmp/clean-venv
/tmp/clean-venv/bin/pip install dist/*.whl
- name: Import smoke test
run: |
/tmp/clean-venv/bin/python -c "
from axonpush import AxonPush, AsyncAxonPush
# Touch the autogenerated API surface to catch missing deps
# in model modules that aren't reached by the bare client import.
from axonpush._internal.api.client import Client
from axonpush._internal.api.models.create_event_dto import CreateEventDto
# Constructing a client should not require any optional dep.
AxonPush(api_key='ak_test', tenant_id='1', base_url='http://localhost:1')
print('clean-install import smoke test passed')
"