Skip to content

try publishing code coverage as comment #15

try publishing code coverage as comment

try publishing code coverage as comment #15

Workflow file for this run

name: Report test coverage on PR

Check failure on line 1 in .github/workflows/pr-comment.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-comment.yaml

Invalid workflow file

(Line: 25, Col: 21): A mapping was not expected
on:
pull_request:
branches: [ "main" ]
jobs:
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
with:
github-token: ${{secrets.GHA_PRS}}
COVERAGE: {{ steps.test.output.coverage }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: $COVERAGE
})