Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SeriesCi coverage report sending #90

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 52 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,55 @@
language: node_js
node_js:
- 11
- 12
- 13
- 11
- 12
- 13
script:
- npm run lint
- npm run build
- npm run test:ci
deploy:
provider: npm
tag: dev
email: $NPM_EMAIL
api_key:
secure: $NPM_API_KEY_SECURE
on:
tags: true
branch: master
- |
start_lint=$(date +%s)
npm run lint
duration_lint=$(echo "$(date +%s) - $start_lint" | bc)
echo "Lint time: ${duration_lint}s"
echo "${duration_lint}s" > lint-execution-time.log

- |
start_build=$(date +%s)
npm run build
duration_build=$(echo "$(date +%s) - $start_build" | bc)
echo "Build time ${duration_build}s"
echo "${duration_build}s" > build-execution-time.log

- |
start_test=$(date +%s)
npm run test:ci
duration_test=$(echo "$(date +%s) - $start_test" | bc)
echo "Test time ${duration_test}s"
echo "${duration_test}s" > test-execution-time.log

after_success:
- 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"
- |
npm run build
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
40 changes: 16 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"karma-mocha": "1.3.0",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "4.0.2",
"lcov-total": "1.0.3",
"live-server": "1.2.1",
"lockfix": "1.0.0",
"make-dir-cli": "2.0.0",
Expand Down