From 03e2fae231a16709d44a57e681dfa64d80eee614 Mon Sep 17 00:00:00 2001 From: novalisdenahi Date: Tue, 4 Nov 2025 14:50:16 +0100 Subject: [PATCH 1/2] Add SONATYPE_CONNECT_TIMEOUT_SECONDS property and set to 120 --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index ae4d7df..0ee9a23 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ version=9.4.4 +SONATYPE_CONNECT_TIMEOUT_SECONDS=120 \ No newline at end of file From f638d4dc97eb9920074c7b404105d03f2785d0e3 Mon Sep 17 00:00:00 2001 From: novalisdenahi Date: Wed, 5 Nov 2025 09:29:15 +0100 Subject: [PATCH 2/2] Split scheduled , pr and push wf --- .github/workflows/java-ci.yml | 4 -- .github/workflows/scheduled-test.yml | 63 ++++++++++++++++++++++++++ .github/workflows/test.yml | 66 ++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/scheduled-test.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index a2739c1..a63d00b 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -1,13 +1,9 @@ name: Java CI on: - schedule: - - cron: '0 0 * * *' push: branches: [ master ] tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] - pull_request: - branches: [ master ] workflow_dispatch: diff --git a/.github/workflows/scheduled-test.yml b/.github/workflows/scheduled-test.yml new file mode 100644 index 0000000..5e6b0e4 --- /dev/null +++ b/.github/workflows/scheduled-test.yml @@ -0,0 +1,63 @@ +name: Java SDK Scheduled Test + +on: + schedule: + - cron: '0 8 * * 1' + + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + java-versions: [ 11, 17, 19 ] + fail-fast: false + steps: + - uses: actions/checkout@v5 + + - name: Set up JDK + uses: actions/setup-java@v5 + with: + java-version: ${{ matrix.java-versions }} + distribution: zulu + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Test with Gradle + run: ./gradlew test --stacktrace + + coverage-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v5 + with: + java-version: 17 + distribution: zulu + cache: gradle + + - name: Cache SonarCloud packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Check with Gradle + run: ./gradlew check --stacktrace + + - name: Execute sonar scan + run: ./gradlew sonar -Dbuild.number=$GITHUB_RUN_NUMBER + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6c93016 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,66 @@ +name: Java SDK Test + +on: + push: + branches-ignore: + - master + pull_request: + branches: [ master ] + + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + java-versions: [ 11, 17, 19 ] + fail-fast: false + steps: + - uses: actions/checkout@v5 + + - name: Set up JDK + uses: actions/setup-java@v5 + with: + java-version: ${{ matrix.java-versions }} + distribution: zulu + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Test with Gradle + run: ./gradlew test --stacktrace + + coverage-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v5 + with: + java-version: 17 + distribution: zulu + cache: gradle + + - name: Cache SonarCloud packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Check with Gradle + run: ./gradlew check --stacktrace + + - name: Execute sonar scan + run: ./gradlew sonar -Dbuild.number=$GITHUB_RUN_NUMBER + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file