22 Commits

Author SHA1 Message Date
thischwa d052555ba7 Merge remote-tracking branch 'origin/develop' into develop
Build and Analyse / build-and-analyse (push) Successful in 41s
2026-06-28 19:38:24 +02:00
thischwa dfa2753619 - moved git actions to gitea actions
- removed sonarqube
- added report for junit tests
2026-06-28 19:37:50 +02:00
thischwa 0a47bb6338 remove javadoc
Build and Analyse / build-and-analyse (push) Successful in 39s
2026-06-28 19:09:53 +02:00
thischwa 25228af9f0 Generate Javadocs for BatchResponse and RecordType classes in the codes.thischwa.cf.model package.
Build and Analyse / build-and-analyse (push) Successful in 39s
2026-06-28 18:20:39 +02:00
thischwa d4fba87e13 Migrate GitHub Actions workflows and custom actions to Gitea, replacing .github directory with .gitea.
Build and Analyse / build-and-analyse (push) Successful in 43s
2026-06-28 13:09:05 +02:00
gitea-actions-bot 9919230a3b ci: update test report [skip ci] 2026-06-28 10:49:25 +00:00
thischwa ba9bc9ea93 Update publish-report action to write output to test.md instead of index.md
Build and Analyse / build-and-analyse (push) Successful in 39s
2026-06-28 12:48:34 +02:00
thischwa eea6e72145 Update changelog for version 0.5.0-SNAPSHOT: migrate to git.mein-gateway.de and replace SonarQube with custom actions
Build and Analyse / build-and-analyse (push) Successful in 40s
2026-06-27 19:39:27 +02:00
gitea-actions-bot c68b865798 ci: update test report [skip ci] 2026-06-27 17:03:10 +00:00
thischwa 41d35fe745 Add JaCoCo coverage parsing to publish-report action; enhance Markdown report with coverage details.
Build and Analyse / build-and-analyse (push) Successful in 39s
2026-06-27 19:02:19 +02:00
thischwa c2d10bb929 Clarify step names in publish-report action for improved readability.
Build and Analyse / build-and-analyse (push) Successful in 40s
2026-06-27 18:53:53 +02:00
thischwa f3e05e1bc7 Extract changelog to a dedicated changelog.md file and update references in README.md.
Build and Analyse / build-and-analyse (push) Successful in 38s
2026-06-27 18:42:12 +02:00
gitea-actions-bot 90664f4007 ci: update test report [skip ci] 2026-06-27 16:25:55 +00:00
thischwa 2c233437da Merge remote-tracking branch 'origin/develop' into develop
Build and Analyse / build-and-analyse (push) Successful in 40s
2026-06-27 18:25:14 +02:00
thischwa 84c5295345 Simplify publish-report action by removing unnecessary variable assignment in JUnit file processing. 2026-06-27 18:24:56 +02:00
thischwa 6d139329f1 reports/index.html gelöscht
Build and Analyse / build-and-analyse (push) Successful in 37s
2026-06-27 18:03:27 +02:00
gitea-actions-bot b5caee443e ci: update test report [skip ci] 2026-06-27 16:00:03 +00:00
thischwa 053979d4e1 Update publish-report to simplify inputs, improve Markdown generation, and adjust token usage for Gitea compatibility
Build and Analyse / build-and-analyse (push) Successful in 39s
2026-06-27 17:59:14 +02:00
thischwa d57da1e60f Switch publish-report action to generate Markdown test reports instead of HTML; modify report structure and formatting.
Build and Analyse / build-and-analyse (push) Failing after 38s
2026-06-27 17:51:48 +02:00
gitea-actions-bot 3613df6974 ci: update test report [skip ci] 2026-06-27 13:11:18 +00:00
thischwa 0acf0d0834 Refactor publish-report to merge JUnit files into single report for HTML generation; remove Maven cache step from setup-java-maven.
Build and Analyse / build-and-analyse (push) Successful in 46s
2026-06-27 15:10:19 +02:00
thischwa 5ed9da4036 Add HTML report generation and auto-commit to publish-report action
Build and Analyse / build-and-analyse (push) Failing after 10m8s
2026-06-27 14:58:30 +02:00
10 changed files with 195 additions and 111 deletions
+120
View File
@@ -0,0 +1,120 @@
name: Publish JUnit Report (Short Names)
description: Normalize JUnit XML report names and publish a test report to the repo.
inputs:
token:
description: Gitea token with write access to the repository.
required: true
runs:
using: composite
steps:
- name: Normalize JUnit report names
shell: bash
run: |
mkdir -p junit-short
shopt -s globstar nullglob
for f in **/target/*-reports/TEST-*.xml; do
base="$(basename "$f")"
short="${base#TEST-}"
cp "$f" "junit-short/${short}"
done
- name: Generate Markdown Test Report
shell: bash
run: |
mkdir -p reports
python3 - <<'EOF'
import glob, xml.etree.ElementTree as ET
# --- JUnit ---
files = glob.glob("junit-short/*.xml")
total_tests = total_failures = total_errors = total_skipped = 0
test_rows = []
for f in sorted(files):
tree = ET.parse(f)
r = tree.getroot()
suites = r.findall("testsuite") if r.tag == "testsuites" else [r]
for ts in suites:
name = ts.get("name", f)
tests = int(ts.get("tests", 0))
failures = int(ts.get("failures", 0))
errors = int(ts.get("errors", 0))
skipped = int(ts.get("skipped", 0))
passed = tests - failures - errors - skipped
status = "✅" if (failures + errors) == 0 else "❌"
total_tests += tests
total_failures += failures
total_errors += errors
total_skipped += skipped
test_rows.append(f"| {status} | {name} | {tests} | {passed} | {failures + errors} | {skipped} |")
total_passed = total_tests - total_failures - total_errors - total_skipped
overall = "✅ All tests passed" if (total_failures + total_errors) == 0 else "❌ Some tests failed"
# --- JaCoCo ---
def counter(el, type_):
c = next((x for x in el.findall("counter") if x.get("type") == type_), None)
if c is None:
return 0, 0
covered = int(c.get("covered", 0))
missed = int(c.get("missed", 0))
return covered, covered + missed
cov_rows = []
jacoco_files = glob.glob("**/target/site/jacoco/jacoco.xml", recursive=True)
for jf in sorted(jacoco_files):
tree = ET.parse(jf)
root = tree.getroot()
for pkg in root.findall("package"):
name = pkg.get("name", "").replace("/", ".")
line_cov, line_total = counter(pkg, "LINE")
branch_cov, branch_total = counter(pkg, "BRANCH")
line_pct = f"{100 * line_cov / line_total:.0f}%" if line_total else "n/a"
branch_pct = f"{100 * branch_cov / branch_total:.0f}%" if branch_total else "n/a"
cov_rows.append(f"| {name} | {line_pct} ({line_cov}/{line_total}) | {branch_pct} ({branch_cov}/{branch_total}) |")
# --- Markdown zusammenbauen ---
md = (
"# Test Report\n\n"
f"**{overall}**\n\n"
"## Test Results\n\n"
"| | Tests | Passed | Failed | Skipped |\n"
"|---|---|---|---|---|\n"
f"| **Total** | {total_tests} | {total_passed} | {total_failures + total_errors} | {total_skipped} |\n\n"
"### Details\n\n"
"| Status | Suite | Tests | Passed | Failed | Skipped |\n"
"|---|---|---|---|---|---|\n"
) + "\n".join(test_rows) + "\n\n"
if cov_rows:
md += (
"## Coverage\n\n"
"| Package | Line Coverage | Branch Coverage |\n"
"|---|---|---|\n"
) + "\n".join(cov_rows) + "\n"
else:
md += "_No JaCoCo report found._\n"
with open("reports/test.md", "w") as out:
out.write(md)
print(md)
EOF
- name: Commit Test-Report to Repo
shell: bash
env:
GIT_USER: gitea-actions-bot
GIT_EMAIL: bot@mein-gateway.de
GITEA_TOKEN: ${{ inputs.token }}
run: |
git config user.name "$GIT_USER"
git config user.email "$GIT_EMAIL"
git remote set-url origin https://$GIT_USER:$GITEA_TOKEN@git.mein-gateway.de/${{ github.repository }}.git
git fetch origin
git checkout ${{ github.ref_name }}
git add reports/
git diff --cached --quiet && echo "No changes" && exit 0
git commit -m "ci: update test report [skip ci]"
git push origin ${{ github.ref_name }}
@@ -19,11 +19,3 @@ runs:
distribution: ${{ inputs.java-distribution }} distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }} java-version: ${{ inputs.java-version }}
uses: actions/setup-java@v5 uses: actions/setup-java@v5
- name: Cache Maven Repository
uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
@@ -17,19 +17,18 @@ jobs:
build-and-analyse: build-and-analyse:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
with: with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Java and Maven - name: Setup Java and Maven
uses: ./.github/actions/setup-java-maven uses: ./.gitea/actions/setup-java-maven
- name: Build and test - name: Build and test
run: mvn -B verify run: mvn -B verify
- name: Publish Test Report - name: Publish Test Report
uses: ./.github/actions/publish-report/ uses: ./.gitea/actions/publish-report
if: ${{ always() }} if: ${{ always() }}
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
report-name: Summary of JUnit Tests
-36
View File
@@ -1,36 +0,0 @@
name: Publish JUnit Report (Short Names)
description: Normalize JUnit XML report names and publish a summary-only test report.
inputs:
token:
description: GitHub token for creating the check run.
required: true
report-name:
description: Name shown for the test report.
required: false
default: Summary of JUnit Tests
runs:
using: composite
steps:
- name: Normalize JUnit report names
shell: bash
run: |
mkdir -p junit-short
shopt -s globstar nullglob
for f in **/target/*-reports/TEST-*.xml; do
base="$(basename "$f")"
short="${base#TEST-}"
short="${short%.xml}"
cp "$f" "junit-short/${short}"
done
- name: Publish Test Report
uses: dorny/test-reporter@v3
with:
name: ${{ inputs.report-name }}
path: "*"
reporter: java-junit
only-summary: true
working-directory: "junit-short"
use-actions-summary: true
token: ${{ inputs.token }}
-15
View File
@@ -1,15 +0,0 @@
when:
- event: push
branch: develop
steps:
# - name: hello
# image: alpine
# commands:
# - echo "Hello World!"
- name: maven verify
image: maven:3-amazoncorretto-17-alpine
commands:
- mvn -B verify
+1 -32
View File
@@ -22,35 +22,7 @@ The project has its own maven repository. Follow the instructions on the latest
## Changelog ## Changelog
- 0.4.0: See [changelog](changelog.md)
- fixed some paging issues
- **Breaking Change**: renamed `client.zone().record()` to `client.zone().getRecord()`
- Code quality improvements: Increasing test coverage
- 0.3.0:
- **Breaking Change**:
- **New Fluent API**: Changed the initialization of the client(`new CfDnsClientBuilder().withApiTokenAuth("your-api-token").build()`)
- Authentication with API token.
- 0.2.0:
- **Breaking Change**: `emptyResultThrowsException` default changed from `true` to `false`. Now applies to both
single and multiple result requests. Empty results will be returned by default without throwing exceptions.
- API method names refactored for consistency: `zoneListAll``zoneList`, `zoneInfo``zoneGet`, `sldListAll`
`recordList`
- RecordEntity getter methods renamed for clarity: `getName()``getSld()`
- **New Fluent API**: Changed the initialization of the client(`new CfDnsClientBuilder().withApiTokenAuth("your-api-token").build()`) and added chainable method interface for more readable DNS operations (
`client.zone().record()...`)
- Code quality improvements: removed duplication in batch operations, improved type safety in HTTP methods,
optimized string concatenation, removed mutable setters from CfDnsClient
- Enhanced type validation in `RecordEntity.build()` with better error messages
- CfClient#recordList must return multiple RecordEntries
- add a missing source jar
- ResponseResultInfo#Errors: wrong object structure
- changing multiple records with put, post, patch and delete for dns-records
- 0.1.0:
- refactored / extended tests
- 0.1.0-beta.3:
- fixed json deserialization
- added logging of api errors
- 0.1.0-beta.1: 1st runnable version
## Methods Overview ## Methods Overview
@@ -439,6 +411,3 @@ try {
--- ---
# Summary
`CfDnsClient` offers a simple interface for managing DNS entries via Cloudflare's public API, allowing seamless CRUD operations and automation-friendly workflows.
+34
View File
@@ -0,0 +1,34 @@
# Changelog
- 0.5.0-SNAPSHOT:
- moved the project to git.mein-gateway.de
- replaced sonarqube with own actions
- 0.4.0:
- fixed some paging issues
- **Breaking Change**: renamed `client.zone().record()` to `client.zone().getRecord()`
- Code quality improvements: Increasing test coverage
- 0.3.0:
- **Breaking Change**:
- **New Fluent API**: Changed the initialization of the client(`new CfDnsClientBuilder().withApiTokenAuth("your-api-token").build()`)
- Authentication with API token.
- 0.2.0:
- **Breaking Change**: `emptyResultThrowsException` default changed from `true` to `false`. Now applies to both
single and multiple result requests. Empty results will be returned by default without throwing exceptions.
- API method names refactored for consistency: `zoneListAll``zoneList`, `zoneInfo``zoneGet`, `sldListAll`
`recordList`
- RecordEntity getter methods renamed for clarity: `getName()``getSld()`
- **New Fluent API**: Changed the initialization of the client(`new CfDnsClientBuilder().withApiTokenAuth("your-api-token").build()`) and added chainable method interface for more readable DNS operations (
`client.zone().record()...`)
- Code quality improvements: removed duplication in batch operations, improved type safety in HTTP methods,
optimized string concatenation, removed mutable setters from CfDnsClient
- Enhanced type validation in `RecordEntity.build()` with better error messages
- CfClient#recordList must return multiple RecordEntries
- add a missing source jar
- ResponseResultInfo#Errors: wrong object structure
- changing multiple records with put, post, patch and delete for dns-records
- 0.1.0:
- refactored / extended tests
- 0.1.0-beta.3:
- fixed json deserialization
- added logging of api errors
- 0.1.0-beta.1: 1st runnable version
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

-15
View File
@@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cloudflare DNS Client - java</title>
</head>
<body>
<h1>Cloudflare DNS Client - java</h1>
<p>A Java-based client for interacting with the Cloudflare DNS API.</p>
<p>
<a href="apidocs/index.html" target="_blank">View API Documentation</a>
</p>
</body>
</html>
+36
View File
@@ -0,0 +1,36 @@
# Test Report
**✅ All tests passed**
## Test Results
| | Tests | Passed | Failed | Skipped |
|---|---|---|---|---|
| **Total** | 90 | 90 | 0 | 0 |
### Details
| Status | Suite | Tests | Passed | Failed | Skipped |
|---|---|---|---|---|---|
| ✅ | codes.thischwa.cf.CfBasicHttpClientTest | 9 | 9 | 0 | 0 |
| ✅ | codes.thischwa.cf.CfClientPenTest | 0 | 0 | 0 | 0 |
| ✅ | codes.thischwa.cf.CfClientTest | 0 | 0 | 0 | 0 |
| ✅ | codes.thischwa.cf.CfDnsClientBuilderTest | 16 | 16 | 0 | 0 |
| ✅ | codes.thischwa.cf.CfDnsClientMockTest | 16 | 16 | 0 | 0 |
| ✅ | codes.thischwa.cf.CfRequestTest | 8 | 8 | 0 | 0 |
| ✅ | codes.thischwa.cf.ObjectMapperTest | 2 | 2 | 0 | 0 |
| ✅ | codes.thischwa.cf.ResponseValidatorTest | 8 | 8 | 0 | 0 |
| ✅ | codes.thischwa.cf.fluent.FluentApiTest | 15 | 15 | 0 | 0 |
| ✅ | codes.thischwa.cf.model.BatchEntryTest | 2 | 2 | 0 | 0 |
| ✅ | codes.thischwa.cf.model.PagingRequestTest | 4 | 4 | 0 | 0 |
| ✅ | codes.thischwa.cf.model.RecordEntityTest | 6 | 6 | 0 | 0 |
| ✅ | codes.thischwa.cf.model.RecordTypeTest | 3 | 3 | 0 | 0 |
| ✅ | codes.thischwa.cf.model.ZoneEntityTest | 1 | 1 | 0 | 0 |
## Coverage
| Package | Line Coverage | Branch Coverage |
|---|---|---|
| codes.thischwa.cf.fluent | 100% (25/25) | 100% (4/4) |
| codes.thischwa.cf.model | 100% (93/93) | 90% (9/10) |
| codes.thischwa.cf | 89% (249/279) | 71% (51/72) |