-
-
Notifications
You must be signed in to change notification settings - Fork 28
62 lines (58 loc) · 1.74 KB
/
Copy pathci.yml
File metadata and controls
62 lines (58 loc) · 1.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
name: Tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
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@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install project and test runner
run: |
python -m pip install poetry==2.3.2
poetry install --all-extras
- name: Run tests
run: poetry run pytest -q
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- name: Install build tools
run: python -m pip install poetry==2.3.2 twine==6.2.0
- name: Validate and build package
run: |
poetry check
poetry build
python -m twine check dist/*
- name: Smoke test wheel installations
run: |
WHEEL=$(find dist -name '*.whl' -print -quit)
python -m venv /tmp/python-substack-base
/tmp/python-substack-base/bin/pip install "$WHEEL"
/tmp/python-substack-base/bin/substack --version
/tmp/python-substack-base/bin/python -c "import substack"
python -m venv /tmp/python-substack-mcp
/tmp/python-substack-mcp/bin/pip install "${WHEEL}[mcp]"
/tmp/python-substack-mcp/bin/python -c "import substack_mcp.mcp_server"
- uses: actions/upload-artifact@v7
with:
name: python-substack-distributions
path: dist/
if-no-files-found: error