2
0
Эх сурвалжийг харах

Run continuous integration tests on a matrix of Python and Borg versions.

Dan Helfman 6 жил өмнө
parent
commit
a0691ae4cd
3 өөрчлөгдсөн 20 нэмэгдсэн , 1 устгасан
  1. 9 1
      .drone.yml
  2. 1 0
      NEWS
  3. 10 0
      tests/end-to-end/test_borgmatic.py

+ 9 - 1
.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

+ 1 - 0
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.

+ 10 - 0
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)