feat: collect coverage and update service on pipe #5
Workflow file for this run
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
name: Update coverage on service | |
on: | |
push: | |
branches: | |
- 965-report-coverage-to-collect-coverage-service | |
jobs: | |
update-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: Update coverage on service | |
run: | | |
npm install | |
npm run test:coverage | |
coverage=$(grep -oP "(?<=<span class=\"strong\">)[^<]+" coverage/lcov-report/index.html | tr -d '%') | |
curl -X PUT \ | |
-H "Content-Type: application/json" \ | |
-d '{"id": 1, "coverage": '"$coverage"'}' \ | |
https://collect-coverage-brisanet.koyeb.app/systems |