Skip to content

Commit 10022bf

Browse files
committed
fix: Update test configuration for GitHub Actions
- Use unittest discover instead of pytest for better compatibility - Remove shebang from test file - Add pytest.ini configuration - Add __init__.py for module discovery - Simplify test command in workflow
1 parent 5f4a18a commit 10022bf

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,9 @@ jobs:
2929
pip install -r requirements.txt
3030
pip install pytest pytest-cov
3131
32-
- name: Run tests with coverage
32+
- name: Run tests
3333
run: |
34-
pytest test_patterns.py -v --cov=pattern_detector --cov=enhanced_patterns --cov-report=xml --cov-report=term
35-
36-
- name: Upload coverage to Codecov
37-
uses: codecov/codecov-action@v3
38-
with:
39-
file: ./coverage.xml
40-
flags: unittests
41-
name: codecov-umbrella
42-
fail_ci_if_error: false
34+
python -m unittest discover -v -s . -p "test_*.py"
4335
4436
demo:
4537
runs-on: ubuntu-latest

__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Crypto Chart Pattern Detector Package

pytest.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[pytest]
2+
testpaths = .
3+
python_files = test_*.py
4+
python_classes = Test*
5+
python_functions = test_*
6+
addopts = -v --tb=short

test_patterns.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
"""
32
Test suite for crypto chart pattern detection
43
"""

0 commit comments

Comments
 (0)