-
Notifications
You must be signed in to change notification settings - Fork 1
100 lines (79 loc) · 2.58 KB
/
Copy pathci.yml
File metadata and controls
100 lines (79 loc) · 2.58 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Basic PR Integration Checks
on:
pull_request:
push:
branches:
- main
- paper
workflow_dispatch:
jobs:
local-code:
name: Local code checks (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.13"]
services:
mongo:
image: mongo:8.0
ports:
- 27017:27017
env:
MONGO_CONNECTION_STRING: mongodb://localhost:27017/
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry and tooling
run: |
python -m pip install --upgrade pip
pip install poetry==2.1.2 ruff
- name: Install project dependencies (server + tests)
run: poetry install --with server,tests
- name: Install keyring backend in Poetry environment
run: poetry run pip install keyrings.alt
- name: Prepare server environment file
run: cp pytupli/server/env.template pytupli/server/.env
- name: Lint code with Ruff
run: poetry run ruff check --output-format=github --target-version=py312
- name: Check formatting with Ruff
run: poetry run ruff format --diff --target-version=py312
- name: Run tests
env:
PYTHON_KEYRING_BACKEND: keyrings.alt.file.PlaintextKeyring
run: poetry run pytest tests --cov=pytupli --cov-report=term --cov-report=xml:coverage.xml
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml
pypi-latest:
name: PyPI latest smoke test (Python 3.13)
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install latest package from PyPI
run: |
python -m pip install --upgrade pip
pip install --upgrade pytupli
- name: Smoke test public integration imports
run: |
python - <<'PY'
import importlib
modules = [
"pytupli.benchmark",
"pytupli.dataset",
"pytupli.quality_metrics",
"pytupli.schema",
"pytupli.storage",
]
for module_name in modules:
importlib.import_module(module_name)
print("Successfully imported core integration modules from latest PyPI release.")
PY