Skip to content

tests on 3.11

tests on 3.11 #32

Workflow file for this run

name: Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
#- 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 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: Commit coverage badge
if: ${{ matrix.python-version == '3.11' }}
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add coverage.svg
if [ -n "$(git status --porcelain)" ]; then
git commit -m 'Updated coverage badge'
git push
else
echo "No changes in coverage to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}