Commit 3e2350be by Torkel Ödegaard

POC on collecting metrics in ci process

parent 51c06a8c
#!/bin/bash
ERROR_COUNT="$(./node_modules/.bin/tsc --project tsconfig.json --noEmit --noImplicitAny true | grep -oP 'Found \K(\d+)')"
DIRECTIVES="$(grep -r -o directive public/app/**/* | wc -l)"
CONTROLLERS="${grep -r -oP \"class .*Ctrl\" public/app/**/* | wc -l}"
echo "Typescript errors: $ERROR_COUNT"
echo "Directives: $DIRECTIVES"
echo "Controllers: $CONTROLLERS"
curl \
-d "{\"metrics\":{\"noImplicitAny\": $ERROR_COUNT}}" \
-H "Content-Type: application/json" \
-u ci:$CIRCLE_STATS \
-X POST https://stats.grafana.org/metric-receiver
......@@ -10,5 +10,6 @@ function exit_if_fail {
fi
}
exit_if_fail ./circle-metrics.sh
exit_if_fail npm run prettier:check
exit_if_fail npm run test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment