From a0691ae4cddf49efb8bebf456a7c1bdddff05643 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 13 Oct 2018 13:09:12 -0700 Subject: [PATCH] Run continuous integration tests on a matrix of Python and Borg versions. --- .drone.yml | 10 +++++++++- NEWS | 1 + tests/end-to-end/test_borgmatic.py | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6fd6bdb..da8a755 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,9 +1,17 @@ pipeline: build: - image: python:3.7.0-alpine3.8 + image: python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} pull: true commands: - pip install tox - tox - apk add --no-cache borgbackup - tox -e end-to-end + +matrix: + ALPINE_VERSION: + - 3.6 + - 3.8 + PYTHON_VERSION: + - 3.6 + - 3.7 diff --git a/NEWS b/NEWS index f217945..e83a767 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ 1.2.8.dev0 * Include link to issue tracker within various command output. + * Run continuous integration tests on a matrix of Python and Borg versions. 1.2.7 * #98: Support for Borg --keep-secondly prune option. diff --git a/tests/end-to-end/test_borgmatic.py b/tests/end-to-end/test_borgmatic.py index ca3f2ad..a415789 100644 --- a/tests/end-to-end/test_borgmatic.py +++ b/tests/end-to-end/test_borgmatic.py @@ -49,5 +49,15 @@ def test_borgmatic_command(): assert len(parsed_output) == 1 assert len(parsed_output[0]['archives']) == 1 + + # Also exercise the info flag. + output = subprocess.check_output( + f'borgmatic --config {config_path} --info --json'.split(' '), + encoding=sys.stdout.encoding, + ) + parsed_output = json.loads(output) + + assert len(parsed_output) == 1 + assert 'repository' in parsed_output[0] finally: shutil.rmtree(temporary_directory)