Skip to content

feat: collect coverage and update via action #4

feat: collect coverage and update via action

feat: collect coverage and update via action #4

Workflow file for this run

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