Codeclimate.com can now analyze coverage as well as maintainability. Engineering Metrics to Improve Continuous Delivery Practices | Velocity
Just in case, I'll leave the codecov.io steps here. The Leading Code Coverage Solution | Codecov
Here, we will explain using Pipenv in a Python project as an example.
Create a new .github/workflows/analyze.yml
and copy the following code.
on:
push:
branches:
- master
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: python -m pip install pipenv
- run: python -m pipenv sync --dev
- run: python -m pipenv run coverage_xml
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true
Output Coverage as XML in some way, Upload to codecov.io using the following GitHub Actions Codecov · Actions · GitHub Marketplace
2-1. Log in to codecov.io and click the ʻAdd new repository` button The Leading Code Coverage Solution | Codecov
2-2. Click on the target repository
2-3. The Repository Upload Token is displayed. Copy it to the clipboard.
2-4.
Go to the GitHub repository and
Click Settings
-> Secrets
-> ʻAdd new secret`
2-5. Enter the following in the form and click the ʻAdd secret` button
Name
: “CODECOV_TOKEN”
Value
: Paste the string copied in step 4.
Recommended Posts