Skip to content

Commit 03bfc50

Browse files
committed
feat(59649): changes according to PR review
1 parent f48a5e0 commit 03bfc50

3 files changed

Lines changed: 17 additions & 51 deletions

File tree

.github/workflows/ci-cd-java.yml

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
required: true
1212
DOCKER_PASSWORD:
1313
required: true
14-
CODECOV_TOKEN:
15-
required: false
1614
inputs:
1715
# it is required for backwards compatibility with CI/CD pipelines that have not been yet fully migrated to shared workflows
1816
uploadJarArtifact:
@@ -40,16 +38,10 @@ on:
4038
required: false
4139
type: boolean
4240
default: false
43-
codeCoverageExcludes:
44-
required: false
45-
type: string
46-
default: ""
4741

4842
env:
4943
IMAGE_NAME_MIXED_CASE: "${{ github.repository }}"
5044
TEST_STAGE: test
51-
JACOCO_VERSION: "0.8.14"
52-
JACOCO_REPORTS: "**/target/site/jacoco/jacoco.xml,**/target/site/jacoco-it/jacoco.xml,**/target/site/jacoco-aggregate/jacoco.xml"
5345

5446
jobs:
5547
build-check-test-push:
@@ -78,48 +70,33 @@ jobs:
7870
working-directory: ${{ inputs.workingDirectory }}
7971
env:
8072
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81-
JACOCO_EXCLUDES: ${{ inputs.codeCoverageExcludes }}
8273
JAVA_TOOL_OPTIONS: ""
8374
MAVEN_OPTS: ""
84-
run: |
85-
JACOCO_EXCLUDES_ARG=""
86-
if [[ -n "${JACOCO_EXCLUDES}" ]]; then
87-
JACOCO_EXCLUDES_ARG="-Djacoco.excludes=${JACOCO_EXCLUDES}"
88-
fi
89-
90-
mvn -Djacoco.version=${JACOCO_VERSION} \
91-
"org.jacoco:jacoco-maven-plugin:${JACOCO_VERSION}:prepare-agent" \
92-
test \
93-
"org.jacoco:jacoco-maven-plugin:${JACOCO_VERSION}:report" \
94-
${JACOCO_EXCLUDES_ARG}
75+
run: mvn -B test
9576

9677
- name: Run Integration tests (Testcontainers)
9778
working-directory: ${{ inputs.workingDirectory }}
9879
env:
9980
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
JACOCO_EXCLUDES: ${{ inputs.codeCoverageExcludes }}
10181
DOCKER_HOST: unix:///var/run/docker.sock
10282
TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE: /var/run/docker.sock
10383
JAVA_TOOL_OPTIONS: ""
10484
MAVEN_OPTS: ""
105-
run: |
106-
JACOCO_EXCLUDES_ARG=""
107-
if [[ -n "${JACOCO_EXCLUDES}" ]]; then
108-
JACOCO_EXCLUDES_ARG="-Djacoco.excludes=${JACOCO_EXCLUDES}"
109-
fi
110-
mvn "org.jacoco:jacoco-maven-plugin:${JACOCO_VERSION}:prepare-agent-integration" \
111-
verify \
112-
"org.jacoco:jacoco-maven-plugin:${JACOCO_VERSION}:report-integration" \
113-
${JACOCO_EXCLUDES_ARG}
85+
run: mvn -B verify
11486

11587
- name: Upload coverage reports to Codecov
11688
uses: codecov/codecov-action@v5
11789
with:
11890
token: ${{ secrets.CODECOV_TOKEN }}
119-
files: ${{ env.JACOCO_REPORTS }}
12091
fail_ci_if_error: true
12192
verbose: true
12293

94+
- name: Upload test results to Codecov
95+
if: ${{ !cancelled() }}
96+
uses: codecov/test-results-action@v1
97+
with:
98+
token: ${{ secrets.CODECOV_TOKEN }}
99+
123100
- name: Build artifact
124101
working-directory: ${{ inputs.workingDirectory }}
125102
run: mvn package -Dmaven.test.skip
@@ -201,7 +178,7 @@ jobs:
201178
if: ${{ env.PERFORM_RELEASE == 'true' }}
202179
uses: docker/setup-buildx-action@v3
203180

204-
- name: Login to Github Container Registry
181+
- name: Login to Docker Hub
205182
if: ${{ env.PERFORM_RELEASE == 'true' }}
206183
uses: docker/login-action@v3
207184
with:

.github/workflows/ci-cd-kotlin.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
required: true
1212
DOCKER_PASSWORD:
1313
required: true
14-
CODECOV_TOKEN:
15-
required: false
1614
inputs:
1715
uploadJarArtifact:
1816
required: false
@@ -28,15 +26,9 @@ on:
2826
required: false
2927
type: boolean
3028
default: false
31-
codeCoverageExcludes:
32-
required: false
33-
type: string
34-
default: ""
3529

3630
env:
3731
IMAGE_NAME_MIXED_CASE: "${{ github.repository }}"
38-
JACOCO_VERSION: "0.8.14"
39-
JACOCO_REPORTS: "**/build/reports/jacoco/test/jacocoTestReport.xml,**/build/reports/jacoco/jacoco.xml"
4032

4133
jobs:
4234
build-check-test-push:
@@ -57,7 +49,7 @@ jobs:
5749
cache: 'gradle'
5850

5951
- name: Check code format and lint
60-
run: ./gradlew spotlessApply
52+
run: ./gradlew spotlessCheck
6153
env:
6254
GITHUB_ACTOR: ${{ github.actor }}
6355
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -66,21 +58,22 @@ jobs:
6658
env:
6759
GITHUB_ACTOR: ${{ github.actor }}
6860
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69-
JACOCO_VERSION: ${{ env.JACOCO_VERSION }}
70-
JACOCO_EXCLUDES: ${{ inputs.codeCoverageExcludes }}
7161
run: |
72-
./gradlew test jacocoTestReport --stacktrace \
73-
-PjacocoVersion="${JACOCO_VERSION}" \
74-
${JACOCO_EXCLUDES:+-PjacocoExcludes="${JACOCO_EXCLUDES}"}
62+
./gradlew test jacocoTestReport --stacktrace
7563
7664
- name: Upload coverage reports to Codecov
7765
uses: codecov/codecov-action@v5
7866
with:
7967
token: ${{ secrets.CODECOV_TOKEN }}
80-
files: ${{ env.JACOCO_REPORTS }}
8168
fail_ci_if_error: true
8269
verbose: true
8370

71+
- name: Upload test results to Codecov
72+
if: ${{ !cancelled() }}
73+
uses: codecov/test-results-action@v1
74+
with:
75+
token: ${{ secrets.CODECOV_TOKEN }}
76+
8477
- name: Upload .jar artifact
8578
if: ${{ inputs.uploadJarArtifact }}
8679
uses: actions/upload-artifact@v4

.github/workflows/ci-cd-typescript.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
required: true
77
DOCKER_PASSWORD:
88
required: true
9-
CODECOV_TOKEN:
10-
required: false
119
inputs:
1210
checkAndTestOutsideDocker:
1311
required: false
@@ -27,7 +25,6 @@ env:
2725
IMAGE_NAME_MIXED_CASE: "${{ github.repository }}"
2826
TEST_STAGE: tester
2927
PRODUCTION_STAGE: production
30-
COVERAGE_REPORTS: "coverage/lcov.info,**/coverage/lcov.info"
3128

3229
jobs:
3330
build-check-test-push:
@@ -59,7 +56,6 @@ jobs:
5956
uses: codecov/codecov-action@v5
6057
with:
6158
token: ${{ secrets.CODECOV_TOKEN }}
62-
files: ${{ env.COVERAGE_REPORTS }}
6359
fail_ci_if_error: true
6460
verbose: true
6561

0 commit comments

Comments
 (0)