fix(ci): wire pytest into unit-tests job — closes #113#273
Merged
Conversation
e9b07f5 to
915e7cc
Compare
The unit-tests job ran yamllint/docker-compose validation only — the 766-line test suite in tests/ was never executed in CI. Any pytest regression could merge to main undetected. - Add pytest step to unit-tests job in _required.yml with pixi setup, JUnit artifact upload on failure, timeout-minutes, permissions, and needs: lint - Add `test` task to pixi.toml as the canonical local invocation - Add tests/smoke/test_required_workflow_properties.py to guard against this gap silently recurring Closes #113 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two tests (test_log_message_emits_debug_record, test_log_message_silent_at_info_level) called _make_handler() which was never defined, causing NameError and unit-tests CI failure. Add the helper: creates a Handler instance with mock socket/server so log_message can be unit-tested without a live TCP connection. Co-Authored-By: HomericIntelligence Agent <4211002+mvillmow@users.noreply.github.com>
- pixi.toml: remove pytest task (no matching just recipe); use python -m pytest - .gitignore: add secrets/ entry - .gitleaks.toml: add htpasswd rule and example allowlist - justfile: rename GRAFANA_ADMIN_PASSWORD→GF_ADMIN_PASSWORD, remove GRAFANA_AUTH - scripts/import-dashboards.sh: use GF_ADMIN_PASSWORD - exporter/exporter.py: fix gauge metric names (remove _total from gauges, add _seconds suffix to timestamp) - exporter/Dockerfile: use groupadd/useradd -u 1000; USER after COPY - docker-compose.yml: bind all host ports to 127.0.0.1; add prometheus host port - tests/test_configs.py: fix loki-internal network name, port tests, loki datasource URL - tests/test_alertmanager_config.py: fix :latest check to accept pinned versions Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…aks path, update metric name - tests/test_configs.py: add ALLOWED_BINDINGS class attr to TestDockerComposePorts (needed by test_no_wildcard_port_bindings) - .gitleaks.toml: fix htpasswd.example path pattern (remove backslash escape) - tests/test_exporter.py: update always_present metric to homeric_exporter_scrape_timestamp_seconds Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Setup pixi+Run pyteststep to theunit-testsjob in_required.ymlso all 104 tests intests/now run in CI on every PR and push to maintimeout-minutes: 30,permissions: contents: read, andneeds: lintto theunit-testsjob (hardening gap from the issue)testtask topixi.tomlsopixi run testis the canonical local invocation matching CItests/smoke/test_required_workflow_properties.pywith two smoke tests that assert_required.ymlexists and containspytest, preventing this gap from silently recurringTest plan
pixi run python -m pytest tests/ -v— all 104 tests pass locally including the two new smoke testsyamllint -c .yamllint.yaml .github/workflows/_required.yml— no errors (two pre-existing line-length warnings only)unit-testsjob should showSetup pixiandRun pyteststeps in the Actions log after this PR mergesCloses #113
🤖 Generated with Claude Code