-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(seriesci): move seriesci scripts out of travis.yml file
- Loading branch information
Showing
2 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "TRAVIS_BRANCH= $TRAVIS_BRANCH" | ||
|
||
if [ "$TRAVIS_BRANCH" = "master" ]; then | ||
echo "post code coverage to seriesci" | ||
echo $(npx lcov-total coverage/lcov.info)% | xargs -I {} curl \ | ||
--header "Authorization: Token ${SERIESCI_TOKEN}" \ | ||
--data-urlencode value="{}" \ | ||
--data sha="${TRAVIS_COMMIT}" \ | ||
https://seriesci.com/api/repos/kopach/karma-sabarivka-reporter/coverage/combined | ||
|
||
echo "post bundle size to seriesci" | ||
du -sh dist/ | awk '{print $1}' | xargs -I {} curl \ | ||
--header "Authorization: Token ${SERIESCI_TOKEN}" \ | ||
--data-urlencode value="{}" \ | ||
--data sha="${TRAVIS_COMMIT}" \ | ||
https://seriesci.com/api/repos/kopach/karma-sabarivka-reporter/bundlesize/combined | ||
|
||
echo "post lint & build & test execution time to seriesci" | ||
duration_build=$(cat build-execution-time.log) | ||
duration_test=$(cat test-execution-time.log) | ||
duration_lint=$(cat lint-execution-time.log) | ||
curl \ | ||
--header "Authorization: Token c698677f-ebb7-44f8-9d72-47a73b7e2121" \ | ||
--header "Content-Type: application/json" \ | ||
--data "{\"values\":[{\"line\":\"build\",\"value\":\"${duration_build}\"},{\"line\":\"test\",\"value\":\"${duration_test}\"},{\"line\":\"lint\",\"value\":\"${duration_lint}\"}],\"sha\":\"$(git rev-parse HEAD)\"}" \ | ||
https://seriesci.com/api/kopach/karma-sabarivka-reporter/time/many | ||
|
||
echo "post number of dependencies to seriesci" | ||
(npm ls --depth=0 --prod --parseable --silent || true) | grep node_modules | wc -l | xargs -I {} curl \ | ||
--header "Authorization: Token ${SERIESCI_TOKEN}" \ | ||
--data-urlencode value="{}" \ | ||
--data sha="${TRAVIS_COMMIT}" \ | ||
https://seriesci.com/api/repos/kopach/karma-sabarivka-reporter/dependencies/combined | ||
|
||
fi |