Skip to content

Commit

Permalink
Merge pull request #9010 from readthedocs/humitos/ubuntu-22.04-for-se…
Browse files Browse the repository at this point in the history
…rvers
  • Loading branch information
humitos authored Apr 27, 2022
2 parents a7d80d8 + a0ab9b7 commit cac2489
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
jobs:
tests:
docker:
- image: 'cimg/python:3.8'
- image: 'cimg/python:3.10'
environment:
TOX_POSARGS: ''
- image: 'docker.elastic.co/elasticsearch/elasticsearch:7.14.0'
Expand All @@ -19,12 +19,12 @@ jobs:
- run: git submodule sync
- run: git submodule update --init
- run: pip install --user tox
- run: tox -e py38
- run: tox -e py310
- codecov/upload

tests-embedapi:
docker:
- image: 'cimg/python:3.8'
- image: 'cimg/python:3.10'
steps:
- checkout
- run: git submodule sync
Expand All @@ -34,7 +34,7 @@ jobs:

checks:
docker:
- image: 'cimg/python:3.8'
- image: 'cimg/python:3.10'
environment:
NODE_VERSION: 10.17.0
steps:
Expand Down
13 changes: 2 additions & 11 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

ARG GITHUB_USER
ARG GITHUB_TOKEN
Expand All @@ -24,21 +24,12 @@ RUN apt-get -y install \
libmysqlclient-dev \
libfreetype6 \
libjpeg-dev \
postgresql-client \
sqlite \
netcat \
telnet \
lsb-release

# https://www.postgresql.org/download/linux/ubuntu/
# Use PostgreSQL client 12 from official PostgreSQL Ubuntu's repository to avoid this WARNING
# WARNING: psql major version 10, server major version 12.
# Some psql features might not work.
# TODO: remove this when upgrading to Ubuntu 20.04 LTS
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get -y update
RUN apt-get -y install postgresql-client-12

# Uncomment en_US.UTF-8 locale and generate it
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ save some work while typing docker compose commands. This section explains these
``inv docker.test``
Runs all the test suites inside the container.

* ``--arguments`` will pass arguments to Tox command (e.g. ``--arguments "-e py38 -- -k test_api"``)
* ``--arguments`` will pass arguments to Tox command (e.g. ``--arguments "-e py310 -- -k test_api"``)

``inv docker.pull``
Downloads and tags all the Docker images required for builders.
Expand Down
10 changes: 5 additions & 5 deletions docs/dev/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ To target a specific environment:

.. prompt:: bash

tox -e py38
tox -e py310

The ``tox`` configuration has the following environments configured. You can
target a single environment to limit the test suite:

py38
Run our test suite using Python 3.8
py310
Run our test suite using Python 3.10

py38-debug
Same as ``py38``, but there are some useful debugging tools available in the environment.
py310-debug
Same as ``py310``, but there are some useful debugging tools available in the environment.

lint
Run code linting using `Prospector`_. This currently runs `pylint`_,
Expand Down
10 changes: 6 additions & 4 deletions tox.embedapi.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tox]
envlist = sphinx-{18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,latest}
# NOTE: Sphinx 3.5 and 4.x < 4.2 fails with Python 3.10 because of a typing issue
envlist = sphinx-{18,20,21,22,23,24,30,31,32,33,34,42,43,44,45,latest}

[testenv]
description = run test suite for the EmbedAPIv3
Expand All @@ -24,13 +25,14 @@ deps =
sphinx-32: Sphinx~=3.2.0
sphinx-33: Sphinx~=3.3.0
sphinx-34: Sphinx~=3.4.0
sphinx-35: Sphinx~=3.5.0
sphinx-40: Sphinx~=4.0.0
sphinx-41: Sphinx~=4.1.0
sphinx-42: Sphinx~=4.2.0
sphinx-43: Sphinx~=4.3.0
sphinx-44: Sphinx~=4.4.0
sphinx-45: Sphinx~=4.5.0
sphinx-latest: Sphinx
jinja2<3.1.0
setenv =
DJANGO_SETTINGS_MODULE=readthedocs.settings.test
VIRTUALENV_SETUPTOOLS=58.3.0
changedir = {toxinidir}/readthedocs
commands = pytest -m embed_api {posargs}
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion=2.9.0
envlist = py38,lint,docs
envlist = py310,lint,docs
skipsdist = True

[testenv]
Expand All @@ -11,12 +11,13 @@ setenv =
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
DJANGO_SETTINGS_SKIP_LOCAL=True
VIRTUALENV_SETUPTOOLS=58.3.0
passenv = CI TRAVIS TRAVIS_* HOME
deps =
-r requirements/testing.txt
debug: -r requirements/debug.txt
basepython =
python3.8
python3.10
commands =
/bin/sh -c '\
export DJANGO_SETTINGS_MODULE=readthedocs.settings.test; \
Expand Down

0 comments on commit cac2489

Please sign in to comment.