Skip to content

Merge pull request #31 from vickumar1981/dependabot/pip/urllib3-2.0.6 #4

Merge pull request #31 from vickumar1981/dependabot/pip/urllib3-2.0.6

Merge pull request #31 from vickumar1981/dependabot/pip/urllib3-2.0.6 #4

name: Update Coverage on Readme
on:
push:
branches:
- master
jobs:
update-coverage-on-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install pyenv
run: |
curl https://pyenv.run | bash
- name: Install dependencies
run: |
make init
- name: Run tests and coverage
run: |
make ci
- name: Coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: Update Readme with Coverage Html
run: |
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.summary_report.outputs.content }}\n<!-- Pytest Coverage Comment:End -->' ./README.md
- name: Commit & Push changes to Readme
uses: actions-js/push@master
with:
message: Update coverage on Readme
github_token: ${{ secrets.GITHUB_TOKEN }}