diff --git a/.circleci/config.yml b/.circleci/config.yml index 2cd49d4d398..776b4d9ad44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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' @@ -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 @@ -34,7 +34,7 @@ jobs: checks: docker: - - image: 'cimg/python:3.8' + - image: 'cimg/python:3.10' environment: NODE_VERSION: 10.17.0 steps: diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 65c74e97298..e533c38490c 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG GITHUB_USER ARG GITHUB_TOKEN @@ -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 diff --git a/docs/dev/install.rst b/docs/dev/install.rst index 1151c81b5c3..6f1175c6c32 100644 --- a/docs/dev/install.rst +++ b/docs/dev/install.rst @@ -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. diff --git a/docs/dev/tests.rst b/docs/dev/tests.rst index ee24d019085..a789c7cd082 100644 --- a/docs/dev/tests.rst +++ b/docs/dev/tests.rst @@ -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`_, diff --git a/tox.embedapi.ini b/tox.embedapi.ini index 984331ccd49..f64a3a9172d 100644 --- a/tox.embedapi.ini +++ b/tox.embedapi.ini @@ -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 @@ -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} diff --git a/tox.ini b/tox.ini index 7d113ccd662..d34f37c29d6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion=2.9.0 -envlist = py38,lint,docs +envlist = py310,lint,docs skipsdist = True [testenv] @@ -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; \