Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/test-modelmaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ on:
branches: [platypus_dev_1.3, main]
paths:
- 'tinyml-modelmaker/**'
- 'tinyml-tinyverse/**'
- 'tinyml-modelzoo/**'
- 'tinyml-modeloptimization/**'
- '.github/workflows/test-modelmaker.yml'
pull_request:
branches: [platypus_dev_1.3, main]
paths:
- 'tinyml-modelmaker/**'
- 'tinyml-tinyverse/**'
- 'tinyml-modelzoo/**'
- 'tinyml-modeloptimization/**'
# Without this, a PR that only changes this workflow (like the one
# introducing this line) never triggers the very CI it modifies.
- '.github/workflows/test-modelmaker.yml'
workflow_dispatch: # manual trigger

jobs:
Expand Down Expand Up @@ -73,3 +82,38 @@ jobs:
- name: Tier 2 — Pipeline Smoke Tests
working-directory: tinyml-modelmaker
run: python -m pytest tests/test_pipeline_smoke.py -v --tb=short

# tinyml-tinyverse, tinyml-modelzoo, and torchmodelopt have no
# equivalent of the Tier steps above -- until now, nothing ran their
# tests/ directories in CI at all, so every regression test added
# there was silently never checked on push/PR. Guarded with a
# find-based existence check (rather than a plain `test -d tests`)
# since an empty tests/ directory makes pytest exit non-zero with "no
# tests collected", which would otherwise fail CI on packages that
# temporarily have no tests.
- name: tinyml-tinyverse Tests
working-directory: tinyml-tinyverse
run: |
if [ -d tests ] && find tests \( -name 'test_*.py' -o -name '*_test.py' \) -print -quit | grep -q .; then
python -m pytest tests/ -v --tb=short
else
echo "No tests found in tinyml-tinyverse/tests/ yet -- skipping."
fi

- name: tinyml-modelzoo Tests
working-directory: tinyml-modelzoo
run: |
if [ -d tests ] && find tests \( -name 'test_*.py' -o -name '*_test.py' \) -print -quit | grep -q .; then
python -m pytest tests/ -v --tb=short
else
echo "No tests found in tinyml-modelzoo/tests/ yet -- skipping."
fi

- name: torchmodelopt — Component Tests
working-directory: tinyml-modeloptimization/torchmodelopt
run: |
if [ -d tests ] && find tests \( -name 'test_*.py' -o -name '*_test.py' \) -print -quit | grep -q .; then
python -m pytest tests/ -v --tb=short
else
echo "No tests found in tinyml-modeloptimization/torchmodelopt/tests/ yet -- skipping."
fi
Loading