1+ name : Tests
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ ubuntu :
7+
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ python-version : [3.6, 3.7, 3.8]
12+ scikit-learn : [0.21.2, 0.22.2, 0.23.1, 0.24]
13+ exclude : # no scikit-learn 0.21.2 release for Python 3.8
14+ - python-version : 3.8
15+ scikit-learn : 0.21.2
16+ include :
17+ - python-version : 3.6
18+ scikit-learn : 0.18.2
19+ scipy : 1.2.0
20+ - python-version : 3.6
21+ scikit-learn : 0.19.2
22+ - python-version : 3.6
23+ scikit-learn : 0.20.2
24+ - python-version : 3.8
25+ scikit-learn : 0.23.1
26+ code-cov : true
27+ fail-fast : false
28+ max-parallel : 4
29+
30+ steps :
31+ - uses : actions/checkout@v2
32+ with :
33+ fetch-depth : 2
34+ - name : Setup Python ${{ matrix.python-version }}
35+ uses : actions/setup-python@v2
36+ with :
37+ python-version : ${{ matrix.python-version }}
38+ - name : Install test dependencies
39+ run : |
40+ python -m pip install --upgrade pip
41+ pip install -e .[test]
42+ - name : Install scikit-learn ${{ matrix.scikit-learn }}
43+ run : |
44+ pip install scikit-learn==${{ matrix.scikit-learn }}
45+ - name : Install scipy ${{ matrix.scipy }}
46+ if : ${{ matrix.scipy }}
47+ run : |
48+ pip install scipy==${{ matrix.scipy }}
49+ - name : Store repository status
50+ id : status-before
51+ run : |
52+ echo "::set-output name=BEFORE::$(git status --porcelain -b)"
53+ - name : Run tests
54+ run : |
55+ if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
56+ pytest -n 4 --durations=20 --timeout=600 --timeout-method=thread --dist load -sv $codecov --reruns 5 --reruns-delay 1
57+ - name : Check for files left behind by test
58+ if : ${{ always() }}
59+ run : |
60+ before="${{ steps.status-before.outputs.BEFORE }}"
61+ after="$(git status --porcelain -b)"
62+ if [[ "$before" != "$after" ]]; then
63+ echo "git status from before: $before"
64+ echo "git status from after: $after"
65+ echo "Not all generated files have been deleted!"
66+ exit 1
67+ fi
68+ - name : Upload coverage
69+ if : matrix.code-cov && always()
70+ uses : codecov/codecov-action@v1
71+ with :
72+ files : coverage.xml
73+ fail_ci_if_error : true
74+ verbose : true
0 commit comments