drastically improved RankOrderConvergenceManager #53
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 dask[distributed] | |
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.10' }} | |
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 'Update coverage badge' | |
git push | |
else | |
echo "No changes to commit" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |