-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (58 loc) · 2.11 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 }}