From 85f0e379b0ab033790b022d5182cbb5b7c8d66fe Mon Sep 17 00:00:00 2001 From: tjens23 Date: Tue, 23 Sep 2025 15:12:52 +0200 Subject: [PATCH 1/2] CI pipeline and mvn settings --- .github/workflows/ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++ .maven-settings.xml | 35 ++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .maven-settings.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..b0dfb8aa5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI + +on: + pull_request: + branches: [ develop ] + push: + branches: [ develop ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 24 + uses: actions/setup-java@v4 + with: + java-version: '24' + distribution: 'temurin' + + - name: Cache Maven dependencies + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Copy Maven settings + run: | + mkdir -p ~/.m2 + cp .maven-settings.xml ~/.m2/settings.xml + + - name: Build with Maven + run: mvn clean compile -B + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Run tests + run: mvn test -B + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Package + run: mvn package -B -DskipTests + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload test results + uses: actions/upload-artifact@v3 + if: always() + with: + name: test-results + path: | + **/target/surefire-reports/ + **/target/failsafe-reports/ diff --git a/.maven-settings.xml b/.maven-settings.xml new file mode 100644 index 000000000..06fb4072d --- /dev/null +++ b/.maven-settings.xml @@ -0,0 +1,35 @@ + + + + + + github + ${env.GITHUB_ACTOR} + ${env.GITHUB_TOKEN} + + + + + github + + + github + GitHub external Packages + https://maven.pkg.github.com/sweat-tek/MavenRepository + + true + + + true + + + + + + + github + + From cc62f065ec61beef9079a9dacaf62abecfc98fc9 Mon Sep 17 00:00:00 2001 From: tjens23 Date: Tue, 23 Sep 2025 15:22:27 +0200 Subject: [PATCH 2/2] Upated version from 3 to 4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0dfb8aa5..775617232 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: test-results