Skip to content

Commit

Permalink
changes to be able to pass tests in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ecorreig committed Nov 17, 2024
1 parent 29294a7 commit 22fad40
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,18 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install coveralls pytest-cov
pip install pytest pytest-cov coveralls
- name: Run tests
run: |
pytest --cov=mmsbm --cov-report=xml tests/
PYTHONPATH=$PYTHONPATH:$(pwd) pytest tests/ -v --cov=mmsbm --cov-report=xml
- name: Upload coverage to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
pip install coveralls
coveralls --service=github
coveralls:
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "--cov=mmsbm --cov-report=term-missing"
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
extras_require={
"dev": [
"pytest >= 3.7",
'pytest-cov',
'coveralls',
],
},
)
Empty file added tests/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion tests/tests.py → tests/test_mmsbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pandas as pd
import numpy as np

from src.mmsbm import MMSBM
from mmsbm import MMSBM


RATING_NUM = 100
Expand Down

0 comments on commit 22fad40

Please sign in to comment.