]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
gitlabci: use retry for flaky tests
authorTomas Krizek <tomas.krizek@nic.cz>
Wed, 20 Feb 2019 13:44:46 +0000 (14:44 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:43:34 +0000 (10:43 +0100)
.gitlab-ci.yml

index 00ec716b0ad93363ef319a479f9041c8931e67df..be2a58c636f849503e5b770641191ffbb85ad4af 100644 (file)
@@ -120,13 +120,10 @@ srpm:
 
 .test_flaky: &test_flaky
   <<: *test
-  except:
-    refs:
-      - master
-    variables:
-      # prevent flaky test from cancelling the rest of pipeline
-      - $SKIP_FLAKY == "1"  # TODO use this variable in schedules
-
+  retry:
+    max: 1
+    when:
+      - script_failure
 
 lint:pedantic:
   stage: test  # could be in build already, but let's not block the test stage if this fails
@@ -273,6 +270,10 @@ pytests 2/2:
   <<: *test_flaky
   script:
     - ${MESON_TEST} pytests.parallel
+  # NOTE using start_in to delay this job is an experimental attempt to reduce chance
+  # this resource-intensive job is started on the same machine as the other pytests
+  when: delayed
+  start_in: 30
 
 respdiff:basic:
   stage: test