Repository navigation
Ci/GitHub actions tests - #99
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tiered test suite + GitHub Actions CI
This PR adds an automated test suite and GitHub Actions CI for BERG. The tests are split into cost-based tiers so pull requests remain fast, while heavier real-weight checks can still be run manually when needed.
CI
Adds
.github/workflows/ci.yml, which runs on pull requests and manual dispatch.The workflow includes three jobs:
smoke
Runs on Python 3.11 and 3.12. Covers weight-free unit and smoke tests. This is the required PR check.
feature-extraction
Downloads only a torchvision backbone and verifies real feature extractors without using BERG S3 weights.
integration
Runs real-weight end-to-end tests. This job is only available through
workflow_dispatchand does not run on pull requests.Tests
Adds a tiered test suite under
tests/.Weight-free tests
Covers:
generate_responsepipelineHeavy tests
Marked with
heavy.Covers real ViT and AlexNet feature extractor construction and verifies output shapes.
Real-weight tests
Marked with
weights.Covers real
encode()output invariants:selection == sliceThe tests are parametrized over the model registry, so newly registered models are covered automatically.
Test markers and tier behavior are configured in
pyproject.toml. Theweightstier is skipped by default.Other changes
safe_import, so missing optional dependencies skip only the affected model instead of breakingimport berg.sphinx-rtd-themeout of runtime dependencies and into an optional docs dependency group.