ci: refactor conda tests, from 6 to 5 (~5 min saved)
With this commit, we combine testing the default python version
installation into the default R version installation test.
DELETE
tests/conda/py-postbuild/README.rst
-Default Python, and an postBuild file
--------------------------------------
-
-We test the default Python version set by repo2docker as used when an
-environment.yml file is provided without a ``python`` dependency, and the use of
-a ``postBuild`` file.

DELETE
tests/conda/py-postbuild/environment.yml
-dependencies:
- - numpy
- - pytest

DELETE
tests/conda/py-postbuild/verify
-#!/bin/sh
-pytest -v ./verify.py

ADD
tests/conda/r-postbuild/README.rst
+Default R, default Python, and a postBuild file
+-----------------------------------------------
+
+We test the default R and Python version set by repo2docker as used when an
+environment.yml file is provided without a ``python`` or ``r-base`` dependency
+pinned, and the use of a ``postBuild`` file.

RENAME
tests/conda/r/environment.yml
tests/conda/r-postbuild/environment.yml
dependencies:
+ - pytest
- r-base
- r-digest

RENAME
tests/conda/py-postbuild/postBuild
tests/conda/r-postbuild/postBuild
RENAME
tests/conda/r/verify
tests/conda/r-postbuild/verify
@@ -8,3 +8,5 @@ R -e "library('digest')"
# Fail if version is not at least 4.2
R --version
R -e 'if (!(version$major == "4" && as.double(version$minor) >= 2)) quit("yes", 1)'
+
+pytest --verbose --color=yes ./verify.py

RENAME
tests/conda/py-postbuild/verify.py
tests/conda/r-postbuild/verify.py
@@ -4,14 +4,12 @@ import sys
def test_sys_version():
+ """The default python version should be 3.7"""
assert sys.version_info[:2] == (3, 7)
-def test_numpy():
- import numpy
-
-
def test_there():
+ """there is to be installed via postBuild"""
import there

DELETE
tests/conda/r/README.rst
-Default R
----------
-
-We test the default R version set by repo2docker as used when r-base is
-specified without a version in an environment.yml file.

MODIFY
tests/conda/r3.6-extra-args/verify.py
tests/conda/r3.6-extra-args/verify.py
@@ -10,8 +10,8 @@ assert sys.executable == os.path.join(
assert sys.executable.startswith("/srv/conda/"), sys.executable
# Repo should be in /srv/repo
-assert os.path.exists("/srv/repo/verify")
-assert os.path.abspath(__file__) == "/srv/repo/verify"
+assert os.path.exists("/srv/repo/verify.py")
+assert os.path.abspath(__file__) == "/srv/repo/verify.py"
# Repo should be writable
assert os.access("/srv/repo", os.W_OK)

ci: refactor conda tests, from 6 to 5 (~5 min saved)

With this commit, we combine testing the default python version
installation into the default R version installation test.