CI: Start testing erratic test again
authorLain Soykaf <lain@lain.com>
Sun, 26 Dec 2021 15:14:56 +0000 (16:14 +0100)
committerLain Soykaf <lain@lain.com>
Sun, 26 Dec 2021 15:17:48 +0000 (16:17 +0100)
Erratic tests are now ran in their own task, so we don't block
normal testing. The runtime is under a minute, so even if this one
has to be retried, it shouldn't take forever.

.gitlab-ci.yml

index f296f7bd9ab67bac88823a8c8efe4d3f5083876a..3860f1db9522a07adb05cbccb1b0d9182b44dd39 100644 (file)
@@ -93,6 +93,27 @@ unit-testing:
     - mix ecto.migrate
     - mix coveralls --preload-modules
 
+unit-testing-erratic:
+  stage: test
+  retry: 2
+  only:
+    changes:
+      - "**/*.ex"
+      - "**/*.exs"
+      - "mix.lock"
+  cache: &testing_cache_policy
+    <<: *global_cache_policy
+    policy: pull
+
+  services:
+  - name: postgres:13
+    alias: postgres
+    command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+  script:
+    - mix ecto.create
+    - mix ecto.migrate
+    - mix test --only=erratic
+
 # Removed to fix CI issue. In this early state it wasn't adding much value anyway.
 # TODO Fix and reinstate federated testing
 # federated-testing: