You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GitHub Actions workflow (.github/workflows/test.yaml) now has two separate jobs:
jobs:
# Full integration tests with testcontainerstest:
runs-on: ubuntu-lateststeps:
- uses: prefix-dev/setup-pixi@v0.9.3
- run: pixi run -e test test-cov# Unit tests only - faster feedback, no containersunit-tests:
runs-on: ubuntu-lateststeps:
- uses: prefix-dev/setup-pixi@v0.9.3
- run: pixi run -e test pytest tests/unit -v
Local Development
Run unit tests locally without any database:
# With pixi (recommended)
pixi run -e test pytest tests/unit/
# With pip
pytest tests/unit/
Run full test suite (testcontainers auto-manages MySQL/MinIO):
pixi run test
Benefits
Aspect
Before
After
Local unit tests
Required DB connection
No dependencies
CI feedback
Single slow job
Fast unit-tests job + full integration
Pre-commit potential
Not feasible
Can add unit tests to pre-commit
The unit tests complete in ~30 seconds in CI, providing fast feedback before the full integration suite (~2-3 minutes).
Activity
dimitri-yatsenko commentedon Jan 8, 2026
DataJoint 2.0 Implementation
This improvement is implemented in DataJoint 2.0. Tests are now split into separate directories with independent CI jobs.
Test Structure
CI Workflow
The GitHub Actions workflow (
.github/workflows/test.yaml) now has two separate jobs:Local Development
Run unit tests locally without any database:
Run full test suite (testcontainers auto-manages MySQL/MinIO):
pixi run testBenefits
The unit tests complete in ~30 seconds in CI, providing fast feedback before the full integration suite (~2-3 minutes).
dimitri-yatsenko commentedon Jan 8, 2026
Closing as resolved in DataJoint 2.0. Tests are now split into
tests/unit/andtests/integration/with separate CI jobs.drewyangdev commentedon Jan 8, 2026
@dimitri-yatsenko Might want to consider also adding it to pre-commit, so that the unit test can fail before the CI failed to save some time.
feat: add unit tests to pre-commit hooks
dimitri-yatsenko commentedon Jan 8, 2026
@drewyangdev Good suggestion! Added unit tests to pre-commit in commit f195110:
Now unit tests run automatically on
git commit, catching issues before CI.