19 Commits

Author SHA1 Message Date
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
thischwa 84a37b8a8d Merge remote-tracking branch 'origin/develop' into develop
Build and Analyse / build-and-analyse (push) Successful in 10m5s
2026-06-27 14:17:13 +02:00
thischwa c292c27444 wip test report 2026-06-27 14:16:41 +02:00
thischwa 744abd47ff Remove SonarCloud integration from project and related configuration files.
Build and Analyse / build-and-analyse (push) Has been cancelled
2026-06-27 14:11:37 +02:00
thischwa 9f301337b6 Remove SonarCloud integration from project and related configuration files.
Build and Analyse / build-and-analyse (push) Successful in 10m11s
2026-06-25 19:18:21 +02:00
thischwa 0a401b164c Migrate project hosting and repository URLs from Codeberg to Gitea.
Build and Analyse / build-and-analyse (push) Failing after 11m54s
2026-06-25 18:55:00 +02:00
thischwa 7b08820d1a Simplify Maven repository setup instructions in README. 2026-04-23 12:58:36 +02:00
thischwa 83995ba5fa Update actions/cache to v5 in setup-java-maven workflow 2026-04-02 19:15:21 +02:00
thischwa d586567fd6 Merge remote-tracking branch 'origin/develop' into develop 2026-04-02 19:01:52 +02:00
thischwa 3505aee124 Update actions: bump setup-java to v5, checkout to v6, and test-reporter to v3 2026-04-02 19:01:33 +02:00
th-schwarz ee3dcda8ea .github/actions/publish-report/action.yml aktualisiert 2026-04-02 18:44:55 +02:00
thischwa c01946fc05 Update version to 0.5.0-SNAPSHOT and fix changelog entry formatting 2026-03-11 13:22:49 +01:00
thischwa 09cb00db19 [maven-release-plugin] prepare for next development iteration 2026-03-11 13:15:43 +01:00
6 changed files with 100 additions and 86 deletions
+66 -15
View File
@@ -1,13 +1,9 @@
name: Publish JUnit Report (Short Names) name: Publish JUnit Report (Short Names)
description: Normalize JUnit XML report names and publish a summary-only test report. description: Normalize JUnit XML report names and publish a test report to the repo.
inputs: inputs:
token: token:
description: GitHub token for creating the check run. description: Gitea token with write access to the repository.
required: true required: true
report-name:
description: Name shown for the test report.
required: false
default: Summary of JUnit Tests
runs: runs:
using: composite using: composite
@@ -24,12 +20,67 @@ runs:
cp "$f" "junit-short/${short}" cp "$f" "junit-short/${short}"
done done
- name: Publish Test Report - name: Generate Markdown Report
uses: dorny/test-reporter@v2 shell: bash
with: run: |
token: ${{ inputs.token }} mkdir -p reports
name: ${{ inputs.report-name }} python3 - <<'EOF'
path: "*" import glob, xml.etree.ElementTree as ET
reporter: java-junit
only-summary: true files = glob.glob("junit-short/*.xml")
working-directory: "junit-short" total_tests = total_failures = total_errors = total_skipped = 0
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
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"
md = (
"# Test Report\n\n"
f"**{overall}**\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(rows) + "\n"
with open("reports/index.md", "w") as out:
out.write(md)
print(md)
EOF
- name: Commit 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 }}
+2 -10
View File
@@ -1,6 +1,6 @@
name: "Setup Maven with GitHub Packages" name: "Setup Maven with GitHub Packages"
description: "Sets up JDK, caches Maven dependencies, and configures GitHub Packages for Maven repositories." description: "Sets up JDK and caches Maven dependencies."
inputs: inputs:
java-version: java-version:
@@ -15,15 +15,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v4
with: with:
distribution: ${{ inputs.java-distribution }} distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }} java-version: ${{ inputs.java-version }}
uses: actions/setup-java@v5
- name: Cache Maven Repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
+3 -9
View File
@@ -17,21 +17,15 @@ jobs:
build-and-analyse: build-and-analyse:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
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: ./.github/actions/setup-java-maven
- name: Build and analyze with SonarCloud - name: Build and test
env: run: mvn -B verify
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CF_API_TOKEN: ${{ secrets.API_TOKEN }}
run: |
echo "Running SonarCloud analysis..."
mvn -B -DtestClasspath=src/test/ verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=th-schwarz_CloudflareDNS-java
- name: Publish Test Report - name: Publish Test Report
uses: ./.github/actions/publish-report/ uses: ./.github/actions/publish-report/
+4 -31
View File
@@ -1,22 +1,12 @@
# CloudflareDNS-java # CloudflareDNS-java
[![pipeline-badge](https://ci.codeberg.org/api/badges/16522/status.svg?events=push%2Cmanual%2Cpull_request%2Cpull_request_closed)](https://ci.codeberg.org/repos/16522)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=th-schwarz_CloudflareDNS-java&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=th-schwarz_CloudflareDNS-java)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=th-schwarz_CloudflareDNS-java&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=th-schwarz_CloudflareDNS-java)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=th-schwarz_CloudflareDNS-java&metric=coverage)](https://sonarcloud.io/summary/new_code?id=th-schwarz_CloudflareDNS-java)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=th-schwarz_CloudflareDNS-java&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=th-schwarz_CloudflareDNS-java)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=th-schwarz_CloudflareDNS-java&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=th-schwarz_CloudflareDNS-java)
[![codeberg.png](docs/codeberg.png)](https://codeberg.org/th-schwarz/CloudflareDNS-java)
## Preface ## Preface
This project provides a java client for minimalistic access to the Cloudflare API version 4, which is mainly used for This project provides a java client for minimalistic access to the Cloudflare API version 4, which is mainly used for
managing DNS settings such as creating, updating and deleting DNS records. managing DNS settings such as creating, updating and deleting DNS records.
If you encounter any bugs or find missing features, feel free to report them on If you encounter any bugs or find missing features, feel free to report them on
the [Codeberg Issues page](https://codeberg.org/th-schwarz/CloudflareDNS-java/issues). the [Gitea Issues page](https://git.mein-gateway.de/thischwa/CloudflareDNS-java/issues).
--- ---
@@ -28,29 +18,12 @@ This guide comes without any warranty. Use at your own risk. The author is not r
## Get It ## Get It
The project has its own maven repository. It can be added to the `pom.xml`: The project has its own maven repository. Follow the instructions on the latest [package](https://git.mein-gateway.de/thischwa/-/packages) to add the repository to your project.
```xml
<repositories>
<repository>
<id>gitea</id>
<url>https://codeberg.org/api/packages/th-schwarz/maven</url>
</repository>
</repositories>
```
The dependency is:
```xml
<dependency>
<groupId>codes.thischwa</groupId>
<artifactId>cloudflaredns</artifactId>
<version>[version]</version>
</dependency>
```
## Changelog ## Changelog
- 0.4.0-SNAPSHOT: - 0.4.0:
- fixed some paging issues
- **Breaking Change**: renamed `client.zone().record()` to `client.zone().getRecord()` - **Breaking Change**: renamed `client.zone().record()` to `client.zone().getRecord()`
- Code quality improvements: Increasing test coverage - Code quality improvements: Increasing test coverage
- 0.3.0: - 0.3.0:
+12 -21
View File
@@ -4,14 +4,14 @@
<groupId>codes.thischwa</groupId> <groupId>codes.thischwa</groupId>
<artifactId>cloudflaredns</artifactId> <artifactId>cloudflaredns</artifactId>
<version>0.4.0</version> <version>0.5.0-SNAPSHOT</version>
<name>CloudflareDNS-java</name> <name>CloudflareDNS-java</name>
<inceptionYear>2025</inceptionYear> <inceptionYear>2025</inceptionYear>
<packaging>jar</packaging> <packaging>jar</packaging>
<issueManagement> <issueManagement>
<url>https://codeberg.org/th-schwarz/CloudflareDNS-java/issues</url> <url>https://git.mein-gateway.de/thischwa/CloudflareDNS-java/issues</url>
<system>Codeberg Issues</system> <system>Gitea Issues</system>
</issueManagement> </issueManagement>
<properties> <properties>
@@ -42,36 +42,27 @@
<junit5.version>5.14.2</junit5.version> <junit5.version>5.14.2</junit5.version>
<mockito-junit5.version>5.21.0</mockito-junit5.version> <mockito-junit5.version>5.21.0</mockito-junit5.version>
<!-- sonarqube -->
<sonar.organization>th-schwarz</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.sourceEncoding>${file.encoding}</sonar.sourceEncoding>
<sonar.projectKey>th-schwarz_CloudflareDNS-java</sonar.projectKey>
<sonar.projectName>CloudflareDNS-java</sonar.projectName>
<sonar.branch.name>develop</sonar.branch.name>
<sonar.test.exclusions>src/test/java/**/*</sonar.test.exclusions>
<lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version> <lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version>
</properties> </properties>
<scm> <scm>
<developerConnection>scm:git:git@codeberg.org:th-schwarz/CloudflareDNS-java.git</developerConnection> <developerConnection>scm:git:https://git.mein-gateway.de/thischwa/CloudflareDNS-java.git</developerConnection>
<connection>scm:git:git@codeberg.org:th-schwarz/CloudflareDNS-java.git</connection> <connection>scm:git:https://git.mein-gateway.de/thischwa/CloudflareDNS-java.git</connection>
<url>https://codeberg.org/th-schwarz/CloudflareDNS-java</url> <url>https://git.mein-gateway.de/thischwa/CloudflareDNS-java</url>
<tag>v0.4.0</tag> <tag>HEAD</tag>
</scm> </scm>
<distributionManagement> <distributionManagement>
<repository> <repository>
<id>codeberg-cloudflaredns</id> <id>mygitea</id>
<url>https://codeberg.org/api/packages/th-schwarz/maven</url> <url>https://git.mein-gateway.de/api/packages/thischwa/maven</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>
</repository> </repository>
<snapshotRepository> <snapshotRepository>
<id>codeberg-cloudflaredns</id> <id>mygitea</id>
<url>https://codeberg.org/api/packages/th-schwarz/maven</url> <url>https://git.mein-gateway.de/api/packages/thischwa/maven</url>
<snapshots> <snapshots>
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
@@ -115,7 +106,7 @@
<dependency> <dependency>
<groupId>org.jetbrains</groupId> <groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId> <artifactId>annotations</artifactId>
<version>24.0.0</version> <version>24.0.1</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
+13
View File
@@ -0,0 +1,13 @@
# Test Report
**✅ All tests passed**
| | Tests | Passed | Failed | Skipped |
|---|---|---|---|---|
| **Total** | 0 | 0 | 0 | 0 |
## Details
| Status | Suite | Tests | Passed | Failed | Skipped |
|---|---|---|---|---|---|