-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github actions script that comments "test test" after test covera…
…ge is created known-issues: should not comment test test but a badge with coverage result Signed-off-by: Aleksandar Zivkovic <[email protected]>
- Loading branch information
1 parent
5cee728
commit 0a11e14
Showing
2 changed files
with
81 additions
and
0 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,42 @@ | ||
name: Measure coverage | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 22 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '22' | ||
cache: maven | ||
|
||
- name: Run Coverage | ||
run: | | ||
chmod +x mvnw | ||
./mvnw clean verify | ||
- name: Add coverage to PR | ||
uses: actions/github-script@v7 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: ${{ github.event.number }}, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'test test' | ||
}) |
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