-
Notifications
You must be signed in to change notification settings - Fork 50
185 lines (149 loc) · 5.53 KB
/
tests.yaml
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: Tests
on:
push:
branches: [ master ]
pull_request:
schedule:
# run every day at midnight
- cron: "0 0 * * *"
defaults:
run:
shell: bash
jobs:
Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
- name: Update packages
run: |
pip install -U pip wheel
- uses: pre-commit/[email protected]
TestStable:
name: Ubuntu / Python ${{ matrix.python-version }} / TensorFlow ${{ matrix.tensorflow-version }} / Scikit-Learn Stable
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
tensorflow-version: ["2.16.1"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and Set Up Poetry
run: |
python -m pip install --upgrade poetry
poetry config virtualenvs.in-project true
poetry run python -m pip install --upgrade pip
- name: Install Dependencies
run: |
poetry install
poetry run python -m pip install -U "tensorflow~=${{ matrix.tensorflow-version }}"
- name: Test with pytest
run: |
poetry run python -m pip freeze
poetry run python -m pytest -v --cov=scikeras --cov-report xml --color=yes
- uses: codecov/codecov-action@v1
TestDev:
name: Ubuntu / Python ${{ matrix.python-version }} / TensorFlow Nightly / Scikit-Learn Nightly
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and Set Up Poetry
run: |
python -m pip install --upgrade poetry
poetry config virtualenvs.in-project true
poetry run python -m pip install --upgrade pip
- name: Install Dependencies
run: |
poetry remove scikit-learn
poetry install
- name: Install Nightly Versions
if: always()
run: |
poetry run python -m pip install -U scipy
poetry run python -m pip install -U git+https://github.com/keras-team/keras.git
poetry run python -m pip install -U --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn
- name: Test with pytest
if: always()
continue-on-error: true
run: |
poetry run python -m pip freeze
poetry run python -m pytest -v --cov=scikeras --cov-report xml --color=yes
- uses: codecov/codecov-action@v1
TestOldest:
name: Ubuntu / Python ${{ matrix.python-version }} / TF ${{ matrix.tf-version }} / Scikit-Learn ${{ matrix.sklearn-version }}
runs-on: ubuntu-latest
strategy:
matrix:
tf-version: ["2.16.1"]
python-version: ["3.9"]
sklearn-version: ["1.4.1.post1"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and Set Up Poetry
run: |
python -m pip install --upgrade poetry
poetry config virtualenvs.in-project true
poetry run python -m pip install --upgrade pip
- name: Install Dependencies
run: |
poetry install -E tensorflow
poetry run pip install \
"tensorflow==${{ matrix.tf-version }}" \
"scikit-learn==${{matrix.sklearn-version}}"
- name: Test with pytest
run: |
poetry run python -m pip freeze
poetry run python -m pytest -v --cov=scikeras --cov-report xml --color=yes
- uses: codecov/codecov-action@v1
TestOSs:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }} / TF Stable / Scikit-Learn Stable
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [MacOS, Windows] # test all OSs except Ubuntu, which is already running other tests
python-version: ["3.9", "3.11"] # test only the two extremes of supported Python versions
tensorflow-version: ["2.16.1"] # test only the two extremes of supported TF versions
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and Set Up Poetry
run: |
pip install --upgrade poetry
poetry config virtualenvs.in-project true
poetry run python -m pip install --upgrade pip
- name: Install Dependencies
# TF is sorta dropping support for Windows
# At the very least they are no longer suppporting GPU
# See https://github.com/tensorflow/tensorflow/releases/tag/v2.12.0
# and
# https://www.tensorflow.org/install/pip#windows-native
run: |
poetry install
poetry run python -m pip install -U "tensorflow~=${{ matrix.tensorflow-version }}"
- name: Test with pytest
run: |
poetry run pip freeze
poetry run python -m pytest -v --cov=scikeras --cov-report xml --color=yes
- uses: codecov/codecov-action@v1