Repository navigation
99 lines (95 loc) · 4.75 KB
/
Copy pathci.yml
File metadata and controls
99 lines (95 loc) · 4.75 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
name: CI
on:
push:
branches: ["**"]
pull_request:
# publish.yml calls this workflow so a release tag publishes only after the same tests pass.
workflow_call:
jobs:
test:
# Pinned to ubuntu-24.04: ubuntu-latest moves to Ubuntu 26 from 2026-10-19. Unpin once 26.04 is verified.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install the SDK and the MCP server
# embeddedci-mcp and embeddedci-openhtf both depend on embeddedci, so
# install the SDK first from the sibling source tree, then the consumers.
run: |
python -m pip install -e "packages/embeddedci[dev]"
python -m pip install -e "packages/embeddedci-mcp[dev]"
- name: Run SDK + MCP tests
# Hardware tests skip without a BENCHPOD_CONNECTION, so the suite stays green on
# runners without a pod. The API/tool surface snapshot tests fail on any unreviewed
# change to the frozen 2.x surface.
#
# ONE RUN PER PACKAGE (same as `make test`). Collecting both in a single pytest call
# breaks: each package has a tests/conftest.py, and the test modules do `from conftest
# import call` — whichever package is collected first wins the top-level `conftest`
# name, so the other package's imports resolve against the wrong module. The two
# test_image_switching.py files collide the same way. Keep these as separate steps.
run: |
pytest -q packages/embeddedci
pytest -q packages/embeddedci-mcp
- name: Release tooling tests + server.json version check
run: |
pytest -q scripts
python scripts/check_release_tag.py --consistency
- name: Install + test the OpenHTF plug
# Tested on the Python versions the package declares (3.10-3.13).
if: matrix.python-version != '3.14'
run: |
python -m pip install -e "packages/embeddedci-openhtf[dev]"
pytest -q packages/embeddedci-openhtf
mcp-min-sdk:
# The MCP server against the oldest SDK its pin allows, installed from PyPI, so a tool that
# needs newer SDK code fails here instead of on a user's machine. A separate job, not an
# entry in the test matrix: an extra matrix key would rename the required "test (3.x)" checks.
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.13"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install the minimum pinned embeddedci from PyPI, then the MCP server
run: |
MIN=$(python scripts/min_sdk_version.py packages/embeddedci-mcp/pyproject.toml)
echo "minimum embeddedci: $MIN"
# A minimum this repository is about to release is not on PyPI yet: test the in-repo SDK,
# which is that version (the release publishes the SDK before the MCP server).
if ! python -m pip install "embeddedci[cloud,discovery,analysis]==$MIN"; then
LOCAL=$(python -c "import sys; sys.path.insert(0, 'scripts'); import check_release_tag as c; print(c.pyproject_version('embeddedci'))")
if [ "$LOCAL" != "$MIN" ]; then echo "embeddedci $MIN is neither on PyPI nor in this repository ($LOCAL)"; exit 1; fi
echo "embeddedci $MIN is not on PyPI yet: using the in-repo package"
python -m pip install -e "packages/embeddedci[cloud,discovery,analysis]"
fi
python -m pip install -e "packages/embeddedci-mcp[dev]"
python -c "import embeddedci, sys; v = embeddedci.__version__; print('testing against embeddedci', v, embeddedci.__file__); sys.exit(v != '$MIN')"
- name: Run the MCP tests
run: pytest -q packages/embeddedci-mcp
build:
runs-on: ubuntu-24.04
strategy:
matrix:
package: [embeddedci, embeddedci-mcp, embeddedci-openhtf]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Build and check ${{ matrix.package }} distribution
working-directory: packages/${{ matrix.package }}
run: |
python -m pip install --upgrade build twine
python -m build
twine check dist/*