Skip to content

Commit 633b536

Browse files
committed
refactor: Simplify CI and reorganize test structure
## CI Simplification - Removed release.yml workflow (no builds/releases) - Simplified ci.yml to single test job - Consolidated test + lint into matrix job - Faster feedback, simpler maintenance ## Test Reorganization Reorganized from flat 31 test files to logical hierarchy: tests/ ├── unit/ # Unit tests (parsers, writers, core, alignment) ├── integration/ # Integration tests (CLI, converter, main API) ├── benchmarks/ # Performance benchmarks ├── validation/ # Real data validation └── test_data/ # Test datasets ## Consolidation - Removed 14 duplicate '_comprehensive' test files - Kept more complete unit/ versions (e.g., 26 tests vs 22) - Consolidated topology tests - Removed empty placeholder directories (e2e, fixtures, performance, property) - Removed conftest_legacy.py ## Test Results - Before: 848 tests (with duplicates) - After: 608 tests (deduplicated) - All tests passing: 608 passed, 4 skipped - No functionality lost - duplicates removed ## Path Fixes - Fixed test_data paths for moved files - Updated validation/test_real_data.py paths - Updated unit/core/test_circular_genome.py paths - Updated unit/alignment/test_alignment.py paths - Updated integration/test_main_api.py paths
1 parent d21cb46 commit 633b536

38 files changed

+40
-5549
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -2,99 +2,39 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main, develop, v0.2.0 ]
5+
branches: [main, develop, "v*"]
66
pull_request:
7-
branches: [ main, develop ]
7+
branches: [main, develop]
88

99
jobs:
10-
# Fast feedback job - runs first for quick results
11-
quick-test:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Python 3.11
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: "3.11"
20-
cache: 'pip'
21-
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -e ".[dev]"
26-
27-
- name: Run tests with coverage
28-
run: |
29-
python -m pytest tests/ --cov=preprimer --cov-report=xml --cov-report=term -v
30-
31-
- name: Upload coverage
32-
uses: codecov/codecov-action@v3
33-
with:
34-
file: ./coverage.xml
35-
36-
# Full test matrix - only runs if quick-test passes
3710
test:
38-
needs: quick-test
3911
runs-on: ${{ matrix.os }}
4012
strategy:
4113
fail-fast: false
4214
matrix:
4315
os: [ubuntu-latest, macos-latest]
4416
python-version: ["3.11", "3.12", "3.13"]
45-
# Exclude ubuntu+3.11 since it was tested in quick-test
46-
exclude:
47-
- os: ubuntu-latest
48-
python-version: "3.11"
49-
50-
steps:
51-
- uses: actions/checkout@v4
52-
53-
- name: Set up Python ${{ matrix.python-version }}
54-
uses: actions/setup-python@v5
55-
with:
56-
python-version: ${{ matrix.python-version }}
57-
cache: 'pip'
5817

59-
- name: Install dependencies
60-
run: |
61-
python -m pip install --upgrade pip
62-
pip install -e ".[dev]"
63-
64-
- name: Run tests
65-
run: |
66-
python -m pytest tests/ -v
67-
68-
# Code quality checks - runs in parallel with quick-test
69-
lint:
70-
runs-on: ubuntu-latest
7118
steps:
72-
- uses: actions/checkout@v4
73-
74-
- name: Set up Python
75-
uses: actions/setup-python@v5
76-
with:
77-
python-version: "3.11"
78-
cache: 'pip'
79-
80-
- name: Install dependencies
81-
run: |
82-
python -m pip install --upgrade pip
83-
pip install -e ".[dev]"
84-
85-
- name: Check formatting
86-
run: black --check preprimer/ tests/
87-
88-
- name: Check imports
89-
run: isort --check-only preprimer/ tests/
90-
91-
- name: Lint
92-
run: flake8 preprimer/ tests/ --max-line-length=88 --extend-ignore=E203,W503
93-
94-
- name: Type check
95-
run: mypy preprimer/ --ignore-missing-imports
96-
97-
- name: Security check
98-
run: |
99-
pip install bandit
100-
bandit -r preprimer/ -ll
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
cache: "pip"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e ".[dev]"
31+
32+
- name: Run tests
33+
run: python -m pytest tests/ -v
34+
35+
- name: Code quality (Python 3.11 only)
36+
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
37+
run: |
38+
black --check preprimer/ tests/
39+
isort --check-only preprimer/ tests/
40+
flake8 preprimer/ tests/ --max-line-length=88 --extend-ignore=E203,W503

.github/workflows/release.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/conftest_legacy.py

Lines changed: 0 additions & 208 deletions
This file was deleted.

tests/fixtures/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)