Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable Coverage #329

Merged
merged 4 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/coverage-build.yml
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
29 changes: 29 additions & 0 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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 }}
34 changes: 0 additions & 34 deletions .github/workflows/coverage.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
cache-dependency-path: netkan/setup.py
- name: Install Dependencies
run: |
pip install netkan/.
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
cache-dependency-path: netkan/setup.py
- name: Install test dependencies
working-directory: netkan
run: pip install .[test]
Expand Down
Loading