-
Notifications
You must be signed in to change notification settings - Fork 292
60 lines (57 loc) · 1.72 KB
/
build.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: build
on:
schedule:
# Every friday at 4am UTC
- cron: '0 4 * * 5'
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python_version:
- '3.8'
- '3.9'
- '3.10'
include:
- os: windows-latest
python_version: '3.10'
- os: ubuntu-latest
python_version: '3.10'
coverage: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python_version }} on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install global dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov coveralls
python -m pip install pandas
- name: Install minimal dependencies
if: ${{ matrix.python_version == '3.8' }}
run: python -m pip install scikit-learn==1.0.2 joblib==1.0.0
- name: Install gplearn
run: python -m pip install .
- name: Describe Python environment
run: |
python --version
python -c "import sklearn; print('sklearn %s' % sklearn.__version__)"
python -c "import joblib; print('joblib %s' % joblib.__version__)"
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"
- name: Test with pytest
run: pytest -v --cov
- name: Coverage
if: ${{ matrix.coverage }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github