-
Notifications
You must be signed in to change notification settings - Fork 75
168 lines (156 loc) · 5.14 KB
/
python-pytest.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python pytest
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# since * is a special character in YAML you have to quote this string
- cron: '0 5 * * 5'
jobs:
test_full:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
include:
- os: ubuntu-20.04
python-version: 3.6
- os: ubuntu-latest
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 dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r requirements.txt "numpy<2.0.0" gcastle pgmpy cython urllib3 igraph pytest-cov==2.4.0 python-coveralls codacy-coverage
pip list
- name: Build extensions
run: |
python setup.py build_ext --inplace
# - name: set environment variables
# uses: allenevans/[email protected]
# with:
# FOO_PYTHONPATH: '.'
- name: Dump environment variables
run: |
python -c "import os;list(map(print,os.environ.items()))"
- name: Test with pytest
run: |
pytest --cov=ylearn --durations=30
test_without_extension:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,]
python-version: [3.8, ]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r requirements.txt igraph pytest-cov==2.4.0 python-coveralls codacy-coverage
pip list
# - name: Build extensions
# run: |
# python setup.py build_ext --inplace
- name: Dump environment variables
run: |
python -c "import os;list(map(print,os.environ.items()))"
- name: Test with pytest
run: |
pytest --cov=ylearn --durations=30
test_without_torch:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,]
python-version: [3.8, ]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install -q "numpy>=1.16.5" "pandas>=0.25.3" "scikit-learn>=0.22.1" scipy networkx ipython joblib pydot cython urllib3 igraph pytest-cov==2.4.0 python-coveralls codacy-coverage
pip list
- name: Build extensions
run: |
python setup.py build_ext --inplace
- name: Dump environment variables
run: |
python -c "import os;list(map(print,os.environ.items()))"
- name: Test with pytest
run: |
pytest --cov=ylearn --durations=30
test_with_lightgbm:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,windows-latest,]
python-version: [3.8, ]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r requirements.txt lightgbm cython urllib3 igraph pytest-cov==2.4.0 python-coveralls codacy-coverage
pip list
- name: Build extensions
run: |
python setup.py build_ext --inplace
- name: Dump environment variables
run: |
python -c "import os;list(map(print,os.environ.items()))"
- name: Test with pytest
run: |
pytest --cov=ylearn --durations=30
test_with_xgboost:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest,windows-latest,]
python-version: [3.8, ]
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 dependencies
run: |
python -m pip install --upgrade pip
pip install -q -r requirements.txt xgboost cython urllib3 igraph pytest-cov==2.4.0 python-coveralls codacy-coverage
pip list
- name: Build extensions
run: |
python setup.py build_ext --inplace
- name: Dump environment variables
run: |
python -c "import os;list(map(print,os.environ.items()))"
- name: Test with pytest
run: |
pytest --cov=ylearn --durations=30