Skip to content

Commit 7feeee9

Browse files
authored
Add Python 3.11 to CI tests (close snowplow#286)
PR snowplow#287 * Add Python 3.11 to CI tests
1 parent 6e886b7 commit 7feeee9

4 files changed

Lines changed: 31 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
15+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]
1616
extras-required: [".", ".[redis]"]
1717

1818
services:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
1010
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git $PYENV_ROOT
1111
RUN git clone --depth=1 https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv
1212

13-
RUN pyenv install 3.5.10 && pyenv install 3.6.14 && pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6 && pyenv install 3.10.1
13+
RUN pyenv install 3.5.10 && pyenv install 3.6.14 && pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6 && pyenv install 3.10.1 && pyenv install 3.11.0
1414

1515
WORKDIR /app
1616
COPY . .

run-tests.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,23 @@ function deploy {
116116
pip install -r requirements-test.txt
117117
source deactivate
118118
fi
119+
120+
# pyenv install 3.11.0
121+
if [ ! -e ~/.pyenv/versions/tracker311 ]; then
122+
pyenv virtualenv 3.11.0 tracker311
123+
pyenv activate tracker311
124+
pip install .
125+
pip install -r requirements-test.txt
126+
source deactivate
127+
fi
128+
129+
if [ ! -e ~/.pyenv/versions/tracker311redis ]; then
130+
pyenv virtualenv 3.11.0 tracker311redis
131+
pyenv activate tracker311redis
132+
pip install .[redis]
133+
pip install -r requirements-test.txt
134+
source deactivate
135+
fi
119136
}
120137

121138

@@ -167,6 +184,15 @@ function run_tests {
167184
pyenv activate tracker310redis
168185
pytest
169186
source deactivate
187+
188+
pyenv activate tracker311
189+
pytest
190+
source deactivate
191+
192+
pyenv activate tracker311redis
193+
pytest
194+
source deactivate
195+
170196
}
171197

172198
function refresh_deploy {
@@ -182,6 +208,8 @@ function refresh_deploy {
182208
pyenv uninstall -f tracker39redis
183209
pyenv uninstall -f tracker310
184210
pyenv uninstall -f tracker310redis
211+
pyenv uninstall -f tracker311
212+
pyenv uninstall -f tracker311redis
185213
}
186214

187215

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"Programming Language :: Python :: 3.8",
6464
"Programming Language :: Python :: 3.9",
6565
"Programming Language :: Python :: 3.10",
66+
"Programming Language :: Python :: 3.11",
6667
"Operating System :: OS Independent",
6768
],
6869
install_requires=["requests>=2.25.1,<3.0", "typing_extensions>=3.7.4"],

0 commit comments

Comments
 (0)