Add run-ci.sh script, check test coverage in CI

This commit is contained in:
Timothée Floure 2021-01-07 09:11:15 +01:00
parent 6604a925f0
commit 34dee38481
Signed by: tfloure
GPG key ID: 4502C902C00A1E12
2 changed files with 18 additions and 1 deletions

View file

@ -24,4 +24,4 @@ tasks:
mix compile mix compile
- test: | - test: |
cd management cd management
mix test mix test --cover

17
run-ci.sh Executable file
View file

@ -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