-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (65 loc) · 2.18 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: Tests on ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.12', 'pypy-3.9']
exclude:
- os: macos-latest
python-version: '3.7'
include:
- os: macos-latest
python-version: '3.8'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install base dependencies
run: pip install tabulate pytest pytest-subtests html5lib
- name: Test minimums
run: pytest
- name: Install NumPy and SciPy
run: |
pip install --only-binary ":all:" numpy
pip install --only-binary ":all:" scipy || true
- name: Test only SciPy
run: pytest
- name: Install python-graphblas
run: pip install --only-binary ":all:" python-graphblas || true
- name: Install PyData/Sparse
run: pip install --only-binary ":all:" sparse || true
- name: Install PyTorch
# importing PyTorch causes a crash on GitHub Actions. Test on the other OSes.
if: ${{ !contains(matrix.os, 'macos') }}
run: pip install --only-binary ":all:" "torch>=2.0.0" || true
- name: Install TensorFlow
run: pip install --only-binary ":all:" tensorflow || true
- name: Python Test without Jupyter
run: pytest
- name: Install Jupyter
if: ${{ !contains(matrix.python-version, 'pypy') }}
run: pip install jupyter
- name: Python Test with Jupyter
if: ${{ !contains(matrix.python-version, 'pypy') }}
run: pytest
- name: Python Test with Coverage
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
pip install pytest-cov
pytest --cov=matrepr --cov-report term --cov-report=xml
- name: Upload Coverage to Codecov
if: ${{ contains(matrix.os, 'ubuntu') }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}