Always test changes before committing:
- Use existing test scripts in
/cmd/test/when available - Write simple tests if none exist (bash scripts, Python tests, or manual verification steps)
- Document test steps in commit messages or PR descriptions
Fast, mocked tests that run via pre-commit hooks on every commit.
cd cmd/scadm
python -m pytest tests/ -m "not integration" -vCLI integration tests exercise real scadm commands against temporary workspaces. Run via CI workflow (.github/workflows/integration-tests.yml) on ubuntu + windows matrix.
| Marker | What | Network | Speed |
|---|---|---|---|
integration (no slow) |
Config parsing, --info, --check, vscode settings, cache |
⚡ version resolution only | ~5s |
integration + slow |
Binary download, library install | ✅ | ~60s |
cd cmd/scadm
# All integration tests
python -m pytest tests/test_cli_integration.py -m integration -v
# Fast only (no downloads)
python -m pytest tests/test_cli_integration.py -m "integration and not slow" -vPrerequisite: Install scadm in editable mode first:
pip install -e cmd/scadm
- Adding or modifying a CLI subcommand → add/update integration test
- Changing
scadm.jsonconfig schema → update config-dependent tests - Changing installer/resolver behavior → update relevant slow tests
When modifying renovate.json5, always test changes before merging to prevent incorrect PRs.
-
Create feature branch
git checkout -b fix/renovate-<description>
-
Make changes and commit
git add renovate.json5 git commit -m "fix(renovate): <description>" -
Push to remote (required for testing)
git push -u origin fix/renovate-<description>
-
Test locally
./cmd/test/test-renovate-local.sh
-
Validate output
- Check that dependencies are detected correctly
- Verify version extraction matches expected format
- Confirm updates are grouped as intended
# Checkout the branch you want to test
git checkout fix/renovate-openscad-separate-extractors
./cmd/test/test-renovate-local.shExpected output should show:
OpenSCAD-Windows: version without.aisuffixOpenSCAD-Linux: version with.aisuffix preserved
# Test pre-commit hooks grouping
git checkout renovate-pre-commit
./cmd/test/test-renovate-local.shExpected output should show:
- Single branch
renovate/pre-commit-hookscontaining all pre-commit hook updates - Both major and minor updates combined (verify
separateMajorMinor: false) "automerge": truein the branch configuration- No separate
renovate/major-pre-commit-hooksbranch
Renovate test fetches from GitHub, so changes must exist remotely before testing validates them.