Skip to content

Commit

Permalink
Merge pull request #6 from CallyCo-io/ci/coverage
Browse files Browse the repository at this point in the history
Split Reporting from Build
  • Loading branch information
techman83 authored Mar 13, 2024
2 parents 82a4ac8 + 9039539 commit ea21f0e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: Check Coverage
name: Build Coverage

on:
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: write

jobs:
coverage:
coverage-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,8 +21,9 @@ jobs:
run: |
coverage run -m pytest
coverage xml
- name: Get Cover
uses: orgoro/[email protected]
- name: Upload Coverage
uses: actions/upload-artifact@v4
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
name: coverage.xml
path: coverage.xml
retention-days: 1
27 changes: 27 additions & 0 deletions .github/workflows/coverage-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Report Coverage

on:
workflow_run:
workflows: ["Build Coverage"]
types:
- completed

permissions:
contents: read
pull-requests: write

jobs:
coverage-report:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/download-artifact@v4
with:
name: coverage.xml
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Cover
uses: orgoro/coverage@v3
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ea21f0e

Please sign in to comment.