Skip to content

Commit 7603763

Browse files
committed
Add a CI job to test against the OFM test suite
This should help catch issues earlier - it means if modifications to OFM are needed, this will be flagged early. It would be nice to keep an OFM branch that's updated with necessary changes for LabThings to work nicely, but this is unlikely to be an automatic thing. For now, I think just being able to check whether the current OFM codebase will work (unmodified) with changes being proposed to LabThings is already helpful.
1 parent 517dc8e commit 7603763

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,35 @@ jobs:
152152
minimum-ratio: 0
153153
send-summary-comment: true
154154
show-annotations: "warning"
155+
156+
test-against-ofm:
157+
runs-on: ubuntu-latest
158+
continue-on-error: true
159+
steps:
160+
- name: Set up Python
161+
uses: actions/setup-python@v4
162+
with:
163+
python-version: 3.11
164+
165+
- name: Clone OpenFlexure Microscope Server
166+
working-directory: /home/runner/work/
167+
run: |
168+
git clone https://gitlab.com/openflexure/openflexure-microscope-server.git
169+
cd openflexure-microscope-server
170+
pip install -e .[dev]
171+
172+
- name: Install LabThings-FastAPI
173+
run: pip install -e .
174+
175+
- name: Run OFM unit tests
176+
working-directory: /home/runner/work/openflexure-microscope-server/
177+
run: pytest
178+
179+
- name: Run OFM integration tests
180+
working-directory: /home/runner/work/openflexure-microscope-server/
181+
run: pytest tests/integration_tests
182+
183+
- name: Run OFM lifecycle test
184+
working-directory: /home/runner/work/openflexure-microscope-server/
185+
run: tests/lifecycle_test/testfile.py
186+

0 commit comments

Comments
 (0)