diff --git a/.github/workflows/selected-java-modules.yml b/.github/workflows/selected-java-modules.yml
new file mode 100644
index 0000000..689c264
--- /dev/null
+++ b/.github/workflows/selected-java-modules.yml
@@ -0,0 +1,56 @@
+name: Ausgewählte Java-Module
+
+on:
+ pull_request:
+ paths:
+ - "java-16-collections/**"
+ - "java-19-optional/**"
+ - "java-20-exceptions-try-catch-finally/**"
+ - "java-21-concurrency-multi-thread/**"
+ - "UnitTest_PropertyBasedTest/**"
+ - ".github/workflows/selected-java-modules.yml"
+ push:
+ branches:
+ - main
+ paths:
+ - "java-16-collections/**"
+ - "java-19-optional/**"
+ - "java-20-exceptions-try-catch-finally/**"
+ - "java-21-concurrency-multi-thread/**"
+ - "UnitTest_PropertyBasedTest/**"
+ - ".github/workflows/selected-java-modules.yml"
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ maven-verify:
+ name: ${{ matrix.module }}
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ strategy:
+ fail-fast: false
+ matrix:
+ module:
+ - java-16-collections
+ - java-19-optional
+ - java-20-exceptions-try-catch-finally
+ - java-21-concurrency-multi-thread
+ - UnitTest_PropertyBasedTest
+
+ steps:
+ - name: Repository auschecken
+ uses: actions/checkout@v7
+
+ - name: Java 22 einrichten
+ uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: "22"
+ cache: maven
+ cache-dependency-path: ${{ matrix.module }}/pom.xml
+
+ - name: Modul kompilieren und testen
+ working-directory: ${{ matrix.module }}
+ run: mvn --batch-mode --no-transfer-progress verify
diff --git a/README.md b/README.md
index 2186cc1..0f92fdf 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
# Java-Lernrepository
+[](https://github.com/hakanmtn/Java-2024/actions/workflows/selected-java-modules.yml)
+
Dieses Repository dokumentiert meine praktische Java-Weiterbildung und eigene
Übungen – von den Grundlagen der Sprache bis zu Datenbankzugriffen mit JDBC und
objektrelationaler Abbildung mit JPA/Hibernate.
@@ -46,6 +48,12 @@ objektrelationaler Abbildung mit JPA/Hibernate.
- JPA und Hibernate ORM
- Git und GitHub
+## Automatische Prüfung
+
+GitHub Actions kompiliert und testet fünf ausgewählte, datenbankfreie Module
+mit Java 22. Dazu gehören Collections, Optional, Exceptions, Nebenläufigkeit
+sowie die Beispiele für Unit- und Property-based Testing.
+
## Verwendung
Repository klonen:
diff --git a/UnitTest_PropertyBasedTest/pom.xml b/UnitTest_PropertyBasedTest/pom.xml
index 9a199d7..4b4f3ad 100644
--- a/UnitTest_PropertyBasedTest/pom.xml
+++ b/UnitTest_PropertyBasedTest/pom.xml
@@ -1,7 +1,7 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.hakanmetin
@@ -12,18 +12,24 @@
22
22
UTF-8
+ 5.13.1
+ 1.9.3
-
-
org.junit.jupiter
- junit-jupiter-api
- 5.12.0
+ junit-jupiter
+ ${junit.version}
test
+
+ org.junit.vintage
+ junit-vintage-engine
+ ${junit.version}
+ test
+
com.pholser
@@ -31,6 +37,7 @@
1.0
test
+
com.pholser
junit-quickcheck-generators
@@ -38,11 +45,10 @@
test
-
net.jqwik
jqwik
- 1.9.2
+ ${jqwik.version}
test
@@ -53,6 +59,13 @@
-
-
-
\ No newline at end of file
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.5.4
+
+
+
+