Skip to content

Commit

Permalink
subpackage environments in test
Browse files Browse the repository at this point in the history
  • Loading branch information
johanos1 committed Dec 20, 2024
1 parent bae037f commit 05e04dd
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 936 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ on:
jobs:
code-checks-and-tests:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- test-folder: tests_synthetic_data_attacks
extras: syn
- test-folder: tests_mia
extras: mia
- test-folder: test_attack_result
extras: dev
- test-folder: test_report_handler
extras: dev

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -22,7 +35,7 @@ jobs:
- name: Install dependencies from pyproject.toml
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install .[${{ matrix.extras }}]
- name: Ruff Linting
run: |
Expand All @@ -33,15 +46,22 @@ jobs:
run: |
pip install pytest pytest-cov pytest-mock coverage-badge
- name: Run tests with pytest
run: |
pytest --cov=leakpro --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html leakpro/tests/
cat ./coverage.xml
- name: Run Tests
run: |
pytest --cov=leakpro --cov-report=term-missing:skip-covered \
--cov-report=xml --cov-report=html leakpro/tests/${{ matrix.test-folder }}
- name: Upload Coverage Report
if: always()
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.test-folder }}
path: ./coverage.xml

- name: Create Coverage Badge
run: |
mkdir -p badges
coverage-badge -o badges/coverage.svg -f
coverage-badge -o badges/coverage-${{ matrix.test-folder }}.svg -f
- name: Deploy Coverage Badge to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
1 change: 0 additions & 1 deletion leakpro/tests/input_handler/__init__.py

This file was deleted.

72 changes: 0 additions & 72 deletions leakpro/tests/input_handler/image_input_handler.py

This file was deleted.

161 changes: 0 additions & 161 deletions leakpro/tests/input_handler/image_utils.py

This file was deleted.

68 changes: 0 additions & 68 deletions leakpro/tests/input_handler/tabular_input_handler.py

This file was deleted.

Loading

0 comments on commit 05e04dd

Please sign in to comment.