added new tests

This commit is contained in:
Andrea Pozzetti
2025-11-14 18:28:20 +00:00
parent 80cca20d4d
commit 2a040b06fc
5 changed files with 526 additions and 72 deletions
+7 -3
View File
@@ -9,15 +9,19 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
@@ -44,5 +48,5 @@ jobs:
- name: Test summary
if: always()
run: |
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
echo "## Test Results (Python ${{ matrix.python-version }})" >> $GITHUB_STEP_SUMMARY
echo "✅ Unit tests completed" >> $GITHUB_STEP_SUMMARY
+58
View File
@@ -0,0 +1,58 @@
name: Windows Tests
on:
push:
branches: [main, master, dev]
pull_request:
branches: [main, master, dev]
jobs:
test-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-mock pytest-asyncio
pip install -r .github/requirements-ci.txt
pip install -r requirements-dev.txt
- name: Run smoke test (import check)
run: |
python -c "import sys; sys.path.insert(0, '.'); print('Testing module import...'); exec(open('tests/smoke_test.py').read())"
env:
PYTHONPATH: ${{ github.workspace }}
- name: Run unit tests
run: |
pytest tests/unit/ -v --cov=nodes --cov-report=xml --cov-report=term-missing
env:
PYTHONPATH: ${{ github.workspace }}
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: windows-tests
name: codecov-windows-py${{ matrix.python-version }}
fail_ci_if_error: false
- name: Test summary
if: always()
run: |
echo "## Windows Test Results (Python ${{ matrix.python-version }})" >> $env:GITHUB_STEP_SUMMARY
echo "✅ Windows tests completed" >> $env:GITHUB_STEP_SUMMARY