mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-04 18:45:22 +00:00

The idea is to have the status badge report if the tests are passing, without considering codecov since it frequently fails due to some network hickup that makes the report upload to fail. This also makes things a bit more compartimentalized.
31 lines
864 B
YAML
31 lines
864 B
YAML
name: CodeCov
|
|
on:
|
|
workflow_run:
|
|
workflows: [Tests]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
coverage_report:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install coverage docopt yarg requests
|
|
|
|
- name: Calculate coverage
|
|
run: coverage run --source=pipreqs -m unittest discover
|
|
|
|
- name: Create XML report
|
|
run: coverage xml
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: coverage.xml
|
|
fail_ci_if_error: true
|