-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'contents' appears to be required for the coverage action. I've enabled this on a couple of other repos and this appears to work.
- Loading branch information
Showing
3 changed files
with
63 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build Coverage | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
coverage-build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: netkan | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
cache-dependency-path: netkan/setup.py | ||
- name: Install test dependencies | ||
run: pip install .[test] | ||
- name: force our git config | ||
run: cp .gitconfig ~/. | ||
- name: Run Coverage | ||
run: | | ||
coverage run -m pytest | ||
coverage xml | ||
- name: Upload Coverage | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage.xml | ||
path: netkan/coverage.xml | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Report Coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build Coverage"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
actions: read | ||
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: techman83/coverage@feat/workflow_run | ||
with: | ||
coverageFile: coverage.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.