From 34dee38481cdd6f891b80444ffa7aa0190cd316a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 7 Jan 2021 09:11:15 +0100 Subject: [PATCH] Add run-ci.sh script, check test coverage in CI --- .build.yml | 2 +- run-ci.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 run-ci.sh diff --git a/.build.yml b/.build.yml index 9a04a1a..5c0d2d9 100644 --- a/.build.yml +++ b/.build.yml @@ -24,4 +24,4 @@ tasks: mix compile - test: | cd management - mix test + mix test --cover diff --git a/run-ci.sh b/run-ci.sh new file mode 100755 index 0000000..aa6d0e2 --- /dev/null +++ b/run-ci.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +BUILDS_INSTANCE=https://builds.sr.ht +MANIFEST=.build.yml + +if [ -z "$SRHT_ACCESS_TOKEN" ]; then + echo "Please set SRHT_ACCESS_TOKEN before calling this script." >&2 + exit 1 +fi + +curl \ + -H Authorization:"token $SRHT_ACCESS_TOKEN" \ + --data "manifest=$(jq -R -r --slurp < $MANIFEST)" \ + --data "note=recycledcloud-management" \ + -X POST $BUILDS_INSTANCE/api/jobs | jq