Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
091137b
dummy commit to try comments on PR
Aug 26, 2025
45a3754
try publishing code coverage as comment
Aug 26, 2025
8acf906
try publishing code coverage as comment
Aug 26, 2025
d847c8a
try publishing code coverage as comment
Aug 26, 2025
02b1eb2
try publishing code coverage as comment
Aug 26, 2025
af19942
try publishing code coverage as comment
Aug 26, 2025
97b3a34
try publishing code coverage as comment
Aug 26, 2025
988ac6f
try publishing code coverage as comment
Aug 26, 2025
bf6ca73
try publishing code coverage as comment
Aug 26, 2025
0fe6cb2
try publishing code coverage as comment
Aug 26, 2025
b69604a
try publishing code coverage as comment
Aug 26, 2025
3033f26
try publishing code coverage as comment
Aug 26, 2025
02b2afb
try publishing code coverage as comment
Aug 26, 2025
44174f6
try publishing code coverage as comment
Aug 26, 2025
8d9fde5
try publishing code coverage as comment
Aug 26, 2025
911c410
try publishing code coverage as comment
Aug 26, 2025
1a1ff73
try publishing code coverage as comment
Aug 26, 2025
230b004
try publishing code coverage as comment
Aug 26, 2025
ba9072d
try publishing code coverage as comment
Aug 26, 2025
e6d9a8e
try publishing code coverage as comment
Aug 26, 2025
0a70b4b
try publishing code coverage as comment
Aug 26, 2025
49492a2
try publishing code coverage as comment
Aug 26, 2025
2afa6d3
try publishing code coverage as comment
Aug 26, 2025
e8c2d27
try publishing code coverage as comment
Aug 26, 2025
26f2f37
try publishing code coverage as comment
Aug 26, 2025
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
21 changes: 17 additions & 4 deletions .github/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: Comment on PR
name: Report test coverage on PR

on:
pull_request:
branches: [ "main" ]

jobs:
comment:
comment-test-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Test
id: test
run: |
echo "coverage<<EOF" >> $GITHUB_OUTPUT
make test-gha >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- uses: actions/github-script@v7
env:
INPUT_COVERAGE: ${{ steps.test.outputs.coverage }}
with:
github-token: ${{secrets.GHA_PRS}}
github-token: ${{ secrets.GHA_PRS }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 Thanks for reporting!'
body: '```' + core.getInput('coverage') + '```'
})
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ test-report-mac:
.PHONY: test-report-win
test-report-win:
start htmlcov/index.html

.PHONY: test-gha
test-gha:
uv run pytest --cov-report=term -r f -s
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def main():
print("Hello from python-template!")
print("Hello from python-basic-template!")


if __name__ == "__main__":
Expand Down