From 321c15407d285c0b7d43276c112c9542ac47bdfd Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Tue, 29 Nov 2022 03:14:24 -0700 Subject: [PATCH] Add utility to test specs individually --- .gitlab-ci.yml | 5 +++++ util/test-all-individually.sh | 5 +++++ 2 files changed, 10 insertions(+) create mode 100755 util/test-all-individually.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d627d27..438c34f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,6 +51,11 @@ spec mocks: script: - crystal spec --error-on-warnings --junit_output=. spec/spectator/mocks/ +spec individual: + extends: spec + script: + - util/test-all-individually.sh + format: script: - shards diff --git a/util/test-all-individually.sh b/util/test-all-individually.sh new file mode 100755 index 0000000..2984a03 --- /dev/null +++ b/util/test-all-individually.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e + +find spec/ -type f -name \*_spec.cr -print0 | \ + xargs -0 -n1 time crystal spec --error-on-warnings -v