Skip to content

Commit 9ccf357

Browse files
Merge pull request #86 from PavanMudigonda/claude-fixes
Claude fixes
2 parents 075da82 + 833b4d8 commit 9ccf357

6 files changed

Lines changed: 55 additions & 155 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Measure coverage
2-
# Test# 10
32

43
on:
54
push:
@@ -9,47 +8,45 @@ on:
98
jobs:
109
build:
1110
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: jacoco-playground
1214
steps:
13-
- uses: actions/checkout@v6
14-
- name: Set up JDK 8
15-
uses: actions/setup-java@v5
16-
with:
17-
java-version: 8
18-
distribution: 'corretto'
19-
15+
- uses: actions/checkout@v4
16+
2017
- name: Set up JDK 17
2118
uses: actions/setup-java@v5.2.0
2219
with:
2320
java-version: 17
2421
distribution: 'corretto'
25-
22+
2623
- name: Grant execute permission for gradlew
2724
run: chmod +x gradlew
28-
25+
2926
- name: Run Coverage
3027
run: ./gradlew testCoverage
3128

3229
- name: Upload Report
33-
uses: 'actions/upload-artifact@v7'
30+
uses: actions/upload-artifact@v4
3431
with:
3532
name: report.xml
36-
path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
33+
path: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
3734

3835
- name: Jacoco Report to PR
3936
id: jacoco
4037
uses: madrapps/jacoco-report@v1.7.2
4138
with:
42-
paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
39+
paths: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
4340
token: ${{ secrets.GITHUB_TOKEN }}
4441
min-coverage-overall: 40
4542
min-coverage-changed-files: 60
4643
debug-mode: false
47-
44+
4845
- name: JaCoCo Code Coverage Report
4946
id: jacoco_reporter
5047
uses: PavanMudigonda/jacoco-reporter@v5.1
5148
with:
52-
coverage_results_path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
49+
coverage_results_path: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
5350
coverage_report_name: Coverage
5451
coverage_report_title: JaCoCo
5552
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -58,21 +55,19 @@ jobs:
5855
fail_below_threshold: false
5956
publish_only_summary: false
6057

61-
# uploads the coverage-report.md artifact
6258
- name: Upload Code Coverage Artifacts
63-
uses: actions/upload-artifact@v7
59+
uses: actions/upload-artifact@v4
6460
with:
6561
name: code-coverage-report
6662
path: "*/coverage-results.md"
67-
retention-days: 1
68-
63+
retention-days: 1
64+
6965
- name: Get the Coverage info
7066
run: |
7167
echo "Total coverage coverage-overall ${{ steps.jacoco.outputs.coverage-overall }}"
7268
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
73-
echo "Coverage coveragePercentage ${{ steps.jacoco_reporter.outputs.coveragePercentage }}"
74-
echo "Coverage coveragePercentageString ${{ steps.jacoco_reporter.outputs.coveragePercentageString }}"
69+
echo "coverage_percentage : ${{ steps.jacoco_reporter.outputs.coverage_percentage }}"
70+
echo "coveragePercentageString : ${{ steps.jacoco_reporter.outputs.coveragePercentageString }}"
7571
76-
- name: Publish Coverager Workflow Build Summary
72+
- name: Publish Coverage Workflow Build Summary
7773
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
78-

.github/workflows/one.yml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11

22
name: CI
33

4-
# Controls when the workflow will run
54
on:
6-
# Triggers the workflow on push or pull request events but only for the main branch
75
push:
86
branches: [ main ]
97
pull_request:
108
branches: [ main ]
11-
12-
# Allows you to run this workflow manually from the Actions tab
139
workflow_dispatch:
1410

15-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1611
jobs:
1712
build:
1813
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: jacoco-playground
1917
steps:
20-
- uses: actions/checkout@v6
18+
- uses: actions/checkout@v4
19+
2120
- name: Set up JDK 17
2221
uses: actions/setup-java@v5.2.0
2322
with:
@@ -31,48 +30,50 @@ jobs:
3130
run: ./gradlew testCoverage
3231

3332
- name: Upload Report
34-
uses: 'actions/upload-artifact@v7.0.0'
33+
uses: actions/upload-artifact@v4
3534
with:
3635
name: report.xml
37-
path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
36+
path: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
3837

3938
- name: Jacoco Report to PR
4039
id: jacoco
4140
uses: madrapps/jacoco-report@v1.7.2
4241
with:
43-
paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
42+
paths: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
4443
token: ${{ secrets.GITHUB_TOKEN }}
4544
min-coverage-overall: 40
4645
min-coverage-changed-files: 60
4746
debug-mode: false
48-
47+
4948
- name: JaCoCo Code Coverage Report
5049
id: jacoco_reporter
5150
uses: PavanMudigonda/jacoco-reporter@v5.1
5251
with:
53-
coverage_results_path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
52+
coverage_results_path: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
5453
coverage_report_name: Coverage
5554
coverage_report_title: JaCoCo
5655
github_token: ${{ secrets.GITHUB_TOKEN }}
5756
skip_check_run: false
5857
minimum_coverage: 80
5958
fail_below_threshold: false
6059
publish_only_summary: true
61-
62-
# Publish Coverage Job Summary # Optional
60+
6361
- name: Add Coverage Job Summary
6462
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
65-
66-
# uploads the coverage-report.md artifact
63+
6764
- name: Upload Code Coverage Artifacts
68-
uses: actions/upload-artifact@v7.0.0
65+
uses: actions/upload-artifact@v4
6966
with:
7067
name: code-coverage-report
7168
path: "*/coverage-results.md"
72-
retention-days: 1
73-
69+
retention-days: 1
70+
7471
- name: Get the Coverage info
7572
run: |
7673
echo "Total coverage coverage-overall ${{ steps.jacoco.outputs.coverage-overall }}"
7774
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
78-
echo "Coverage coverage_percentage ${{ steps.jacoco.outputs.coverage_percentage }}"
75+
echo "coverage_percentage : ${{ steps.jacoco_reporter.outputs.coverage_percentage }}"
76+
echo "coveragePercentageString : ${{ steps.jacoco_reporter.outputs.coveragePercentageString }}"
77+
echo "covered_lines : ${{ steps.jacoco_reporter.outputs.covered_lines }}"
78+
echo "missed_lines : ${{ steps.jacoco_reporter.outputs.missed_lines }}"
79+
echo "total_lines : ${{ steps.jacoco_reporter.outputs.total_lines }}"

.github/workflows/test-action-alt.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/time.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/two.yml

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
# This is a basic workflow to help you get started with Actions #6
2-
31
name: CI-TWO
42

5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
84
push:
95
branches: [ main ]
106
pull_request:
117
branches: [ main ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
148
workflow_dispatch:
159

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1710
jobs:
1811
build:
1912
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: jacoco-playground
2016
steps:
21-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@v4
18+
2219
- name: Set up JDK 17
2320
uses: actions/setup-java@v5.2.0
2421
with:
@@ -31,51 +28,38 @@ jobs:
3128
- name: Run Coverage
3229
run: ./gradlew testCoverage
3330

34-
3531
- name: Jacoco Report to PR
3632
id: jacoco
3733
uses: madrapps/jacoco-report@v1.7.2
3834
with:
39-
paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
35+
paths: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
4036
token: ${{ secrets.GITHUB_TOKEN }}
4137
min-coverage-overall: 40
4238
min-coverage-changed-files: 60
4339
debug-mode: false
44-
40+
4541
- name: JaCoCo Code Coverage Report
4642
id: jacoco_reporter
4743
uses: PavanMudigonda/jacoco-reporter@v5.1
4844
with:
49-
coverage_results_path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
45+
coverage_results_path: ${{ github.workspace }}/jacoco-playground/build/reports/jacoco/testCoverage/testCoverage.xml
5046
coverage_report_name: Coverage
5147
coverage_report_title: JaCoCo
5248
github_token: ${{ secrets.GITHUB_TOKEN }}
53-
skip_check_run: true # set to false to publish check run
49+
skip_check_run: true
5450
minimum_coverage: 80
55-
fail_below_threshold: false # set to false to pass below even when threshold is not met
56-
publish_only_summary: false. #set to true to publish only summary to avoid 65k problem
51+
fail_below_threshold: false
52+
publish_only_summary: false
5753

58-
# Publish Coverage Job Summary # Optional
5954
- name: Add Coverage Job Summary
6055
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
61-
56+
6257
- name: Get the Coverage info
6358
run: |
6459
echo "Total coverage coverage-overall ${{ steps.jacoco.outputs.coverage-overall }}"
6560
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
66-
echo "Coverage coverage_percentage ${{ steps.jacoco.outputs.coverage_percentage }}"
67-
68-
# - name: construct coverage job summary markdown
69-
# run: |
70-
# cat > coverage_summary.md <<EOF
71-
# | Code Coverage Summary | Value |
72-
# |--------------------------------------------|----------------------------------------------------------|
73-
# | Code Coverage % | ${{ steps.jacoco_reporter.outputs.coverage_percentage }} |
74-
# | :heavy_check_mark: Number of Lines Covered | ${{ steps.jacoco_reporter.outputs.covered_lines }} |
75-
# | :x: Number of Lines Missed | ${{ steps.jacoco_reporter.outputs.missed_lines }} |
76-
# | Total Number of Lines | ${{ steps.jacoco_reporter.outputs.total_lines }} |
77-
# EOF
78-
# cat coverage_summary.md >> $GITHUB_STEP_SUMMARY
79-
80-
- name: print output
81-
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
61+
echo "coverage_percentage : ${{ steps.jacoco_reporter.outputs.coverage_percentage }}"
62+
echo "coveragePercentageString : ${{ steps.jacoco_reporter.outputs.coveragePercentageString }}"
63+
echo "covered_lines : ${{ steps.jacoco_reporter.outputs.covered_lines }}"
64+
echo "missed_lines : ${{ steps.jacoco_reporter.outputs.missed_lines }}"
65+
echo "total_lines : ${{ steps.jacoco_reporter.outputs.total_lines }}"

.github/workflows/usage.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)