updated coverage badge in actions #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
#- name: Install cuda | |
# uses: Jimver/[email protected] | |
# id: cuda-toolkit | |
# with: | |
# cuda: '12.1.0' | |
#- run: nvcc -V | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install coverage-badge | |
pip install scikit-learn | |
pip install scipy | |
pip install numpy | |
pip install networkx | |
pip install matvec | |
pip install mkl | |
pip install sparse_dot_mkl | |
pip install wget | |
pip install tensorflow | |
pip install torch torchvision torchaudio | |
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.3.0+cpu.html | |
pip install pytest | |
pip install pytest-cov | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run tests | |
run: | | |
pytest -x --cov=pygrank --cov-report=xml tests/test_autorefs.py tests/test_core.py tests/test_measures.py tests/test_filters.py tests/test_autotune.py tests/test_filter_optimization.py tests/test_gnn.py tests/test_postprocessing.py tests/test_benchmarks.py tests/test_fairness.py tests/test_preprocessor.py | |
- name: Generate coverage badge | |
run: coverage-badge -o coverage.svg -f | |
- name: Upload coverage badge | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-badge | |
path: coverage.svg |