Skip to content

Commit dcbb76b

Browse files
authored
Merge pull request #205 from HolobiomicsLab/propose/ci-pytest
ci(tests): run pytest on pull requests and pushes
2 parents 440ea47 + 93c2ae6 commit dcbb76b

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/known-failing-tests.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Tests that fail on mimosa_v2 as of ff41764 (2026-09-02) in a fresh
2+
# `uv sync --group dev` environment without API keys, one pytest node id
3+
# per line. The CI workflow deselects them so that it can flag regressions in
4+
# the rest of the suite. Each entry is a code/test drift, not an environment
5+
# issue except the last one; remove the line when the test passes again.
6+
#
7+
# csv_mode.EVAL_LOG_FILE is logs/evaluation_csv_mode.log; the test expects
8+
# logs/evaluation._csv_mode.log.
9+
tests/csv_mode_logging_test.py::test_log_file_lives_in_logs_directory
10+
# EvaluationCLI._validate_queue was removed in 2d480dc; the tests still call it.
11+
tests/evaluation_cli_test.py::test_validate_queue_allows_overlapping_ports
12+
tests/evaluation_cli_test.py::test_validate_queue_rejects_shared_workspace
13+
# _setup_connectivity returns [''] where the tests expect [].
14+
tests/evaluation_cli_test.py::test_setup_connectivity_reuses_previous_runs_port_range
15+
tests/evaluation_cli_test.py::test_setup_connectivity_empty_ip_keeps_current_range
16+
tests/evaluation_cli_test.py::test_setup_connectivity_accepts_overlapping_range_without_constraint
17+
# The failure fingerprint has seven dimensions; the tests pin six.
18+
tests/failure_fingerprint_test.py::test_dimension_is_six
19+
tests/failure_fingerprint_test.py::test_absent_source_uses_neutral_and_mask
20+
tests/failure_fingerprint_test.py::test_source_label_normalisation
21+
tests/failure_fingerprint_test.py::test_unknown_source_is_ignored
22+
# Default pricing changed (0.0105 per call where the tests expect 0.00082).
23+
tests/pricing_test.py::test_calculate_cost_handles_scalar_and_list_model_id
24+
tests/pricing_test.py::test_single_agent_memory_is_priced
25+
# Generated save_memories code and SmolAgentFactory.model_id drifted from the tests.
26+
tests/single_agent_factory_logprobs_test.py::test_generated_save_memories_writes_logprobs_and_strips_raw
27+
tests/single_agent_factory_logprobs_test.py::test_generated_save_memories_warns_only_when_logprobs_all_missing
28+
tests/smolagent_factory_logprobs_test.py::test_save_memories_writes_logprobs_and_strips_raw
29+
tests/smolagent_factory_logprobs_test.py::test_save_memories_warns_only_when_logprobs_all_missing
30+
# Calls the live LLM provider through VariationEngine.mutation_prompt; fails
31+
# with an AuthenticationError wherever no API key is configured, CI included.
32+
tests/variation_engine_test.py::test_mutation_prompt_does_not_touch_gradient_history

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main, mimosa_v2]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
pytest:
13+
name: pytest (Python 3.11, ubuntu)
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 40
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
21+
with:
22+
python-version: "3.11"
23+
enable-cache: true
24+
25+
- name: Install project and test dependencies
26+
run: uv sync --group dev
27+
28+
- name: Run the suite
29+
# Tests listed in .github/known-failing-tests.txt already fail on the
30+
# base branch for reasons unrelated to any pull request. They are
31+
# deselected so that a regression elsewhere stays visible. Delete a
32+
# line as soon as its test passes again.
33+
run: |
34+
DESELECT=$(grep -v '^#' .github/known-failing-tests.txt | grep -v '^[[:space:]]*$' | sed 's/^/--deselect /' | tr '\n' ' ')
35+
echo "Deselected: ${DESELECT:-none}"
36+
uv run pytest tests/ -q $DESELECT

0 commit comments

Comments
 (0)