From 79ece9401bde6f399291c2ea68b692efe7800858 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Tue, 19 Apr 2022 18:13:23 +0000 Subject: [PATCH] feat(dev): enable gitpod development Use the initalization phase to install all of the Python versions and run the tests on startup, making subsequent test runs faster. Signed-off-by: Mike Fiedler --- .gitpod.yml | 23 +++++++++++++++++++++++ pyproject.toml | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..8c924e6 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,23 @@ +# See https://www.gitpod.io/docs/references/gitpod-yml for full reference + +tasks: + - name: Setup Development and run Tests + + init: | + # Upgrade pyenv itself + pyenv update + + export PY_VERSIONS="3.7 3.8 3.9 3.10" + + # Install all supported Python versions + for py in $PY_VERSIONS; + do pyenv install "$py":latest --skip-existing ; + done + + # Make versions available via $PATH, exclude GitPod default + pyenv global $(pyenv versions --bare | grep -v 3.8.13) + + # Install `tox` test orchestrator + pip install tox + + command: tox diff --git a/pyproject.toml b/pyproject.toml index 22f34d0..7ed9175 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,10 @@ requires = ["setuptools>=40.8.0", "wheel", "bleach>=2.1.0", "docutils>=0.13.1", "Pygments>=2.5.1"] build-backend = "setuptools.build_meta:__legacy__" +# TODO: Remove when https://github.com/mgedmin/check-manifest/pull/155 released +[tool.check-manifest] +ignore = [".gitpod.yml"] + [tool.mypy] strict = true warn_unused_configs = true