From e0d1d2814ca9b62e4357f5bd4e5f61a3d49f6657 Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Wed, 28 Oct 2020 20:56:39 +0000 Subject: tox.ini/.gitlab-ci.yml: Add test environment for Python 3.9 --- .gitlab-ci.yml | 10 +++++++--- tox.ini | 38 +++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43ccc462f..2031e2791 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,12 +25,12 @@ variables: # Our own variables # Version of the docker images we should use for all the images. # This is taken from buildstream/buildstream-docker-images - DOCKER_IMAGE_VERSION: master-177137613 + DOCKER_IMAGE_VERSION: master-210859421 PYTEST_ADDOPTS: "--color=yes" INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache" PYTEST_ARGS: "--color=yes --integration -n 2" TEST_COMMAND: "tox -- ${PYTEST_ARGS}" - TOXENV: py36, py37, py38-nocover, py36-plugins, py37-plugins, py38-plugins-nocover + TOXENV: py36, py37, py38-nocover, py39-nocover, py36-plugins, py37-plugins, py38-plugins-nocover, py39-plugins-nocover COVERAGE_PREFIX: "${CI_JOB_NAME}." @@ -76,6 +76,10 @@ tests-fedora-32: image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:32-${DOCKER_IMAGE_VERSION} <<: *tests +tests-fedora-33: + image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:33-${DOCKER_IMAGE_VERSION} + <<: *tests + tests-ubuntu-18.04: image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:18.04-${DOCKER_IMAGE_VERSION} <<: *tests @@ -220,7 +224,7 @@ tests-no-usedevelop: image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:32-${DOCKER_IMAGE_VERSION} <<: *tests variables: - TOXENV: py36-nocover,py37-nocover,py38-nocover + TOXENV: py36-nocover,py37-nocover,py38-nocover, py39-nocover # Run type checkers diff --git a/tox.ini b/tox.ini index 0c798f284..c06d17ba7 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # Tox global configuration # [tox] -envlist = py{36,37},py38-nocover +envlist = py{36,37},py38-nocover,py39-nocover skip_missing_interpreters = true isolated_build = true @@ -18,29 +18,29 @@ BST_PLUGINS_EXPERIMENTAL_VERSION = 1.93.4 [testenv] usedevelop = # This is required by Cython in order to get coverage for cython files. - py{36,37,38}-!nocover: True + py{36,37,38,39}-!nocover: True commands = # Running with coverage reporting enabled - py{36,37,38}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs} + py{36,37,38,39}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs} # Running with coverage reporting disabled - py{36,37,38}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs} + py{36,37,38,39}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs} # Running external plugins tests with coverage reporting enabled - py{36,37,38}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs} + py{36,37,38,39}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs} # Running external plugins tests with coverage disabled - py{36,37,38}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs} + py{36,37,38,39}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs} commands_post: - py{36,37,38}-!nocover: mkdir -p .coverage-reports - py{36,37,38}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname} + py{36,37,38,39}-!nocover: mkdir -p .coverage-reports + py{36,37,38,39}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname} deps = - py{36,37,38}: -rrequirements/requirements.txt - py{36,37,38}: -rrequirements/dev-requirements.txt + py{36,37,38,39}: -rrequirements/requirements.txt + py{36,37,38,39}: -rrequirements/dev-requirements.txt # Install local sample plugins for testing pip plugin origins - py{36,37,38}: {toxinidir}/tests/plugins/sample-plugins + py{36,37,38,39}: {toxinidir}/tests/plugins/sample-plugins # Install external plugins for plugin tests - py{36,37,38}-plugins: git+https://gitlab.com/buildstream/bst-plugins-experimental.git@{env:BST_PLUGINS_EXPERIMENTAL_VERSION:{[config]BST_PLUGINS_EXPERIMENTAL_VERSION}}#egg=bst_plugins_experimental[deb] + py{36,37,38,39}-plugins: git+https://gitlab.com/buildstream/bst-plugins-experimental.git@{env:BST_PLUGINS_EXPERIMENTAL_VERSION:{[config]BST_PLUGINS_EXPERIMENTAL_VERSION}}#egg=bst_plugins_experimental[deb] # Only require coverage and pytest-cov when using it !nocover: -rrequirements/cov-requirements.txt @@ -68,17 +68,17 @@ passenv = # These keys are not inherited by any other sections # setenv = - py{36,37,38}: COVERAGE_FILE = {envtmpdir}/.coverage - py{36,37,38}: BST_TEST_HOME = {envtmpdir} - py{36,37,38}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache - py{36,37,38}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config - py{36,37,38}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share + py{36,37,38,39}: COVERAGE_FILE = {envtmpdir}/.coverage + py{36,37,38,39}: BST_TEST_HOME = {envtmpdir} + py{36,37,38,39}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache + py{36,37,38,39}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config + py{36,37,38,39}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share # This is required to get coverage for Cython - py{36,37,38}-!nocover: BST_CYTHON_TRACE = 1 + py{36,37,38,39}-!nocover: BST_CYTHON_TRACE = 1 randomized: PYTEST_ADDOPTS="--random-order-bucket=global" whitelist_externals = - py{36,37,38}: + py{36,37,38,39}: mv mkdir -- cgit v1.2.1