From 812bcfcde2206015ac54b7f64cf4783f352e2cb4 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 08:52:23 +0000 Subject: [PATCH 01/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5e9e1cf..634800b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,6 +1,7 @@ name: Build on: + pull_request: push: branches: - main -- 2.45.2 From bcecf66bcbe9db29cc986b2499e70d0f15be6fb1 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 08:56:11 +0000 Subject: [PATCH 02/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 634800b..d3b73bc 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -40,4 +40,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info \ No newline at end of file + run: ./gradlew build sonar --info -Dsonar.branch.name = main \ No newline at end of file -- 2.45.2 From 367abcc422376b7dbff20f2f340b926ea756ee8c Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 09:14:32 +0000 Subject: [PATCH 03/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d3b73bc..634800b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -40,4 +40,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info -Dsonar.branch.name = main \ No newline at end of file + run: ./gradlew build sonar --info \ No newline at end of file -- 2.45.2 From d7edfabc46f58f097b42d887ae3134a114f52384 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 10:08:24 +0000 Subject: [PATCH 04/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 634800b..1ac5b97 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,6 +1,6 @@ name: Build -on: +on: # test pull_request: push: branches: -- 2.45.2 From 6ec7db75d8c6a2ae1589fdd321398d0b0de43def Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 10:41:47 +0000 Subject: [PATCH 05/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1ac5b97..556c80b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -40,4 +40,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info \ No newline at end of file + run: ./gradlew build sonar --info -Dsonar.pullrequest.key=${{ github.event.number }} \ No newline at end of file -- 2.45.2 From a840436e8d8151a47b524acfd1e47f33658c4e63 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 10:49:58 +0000 Subject: [PATCH 06/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 556c80b..6b96eb2 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -40,4 +40,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info -Dsonar.pullrequest.key=${{ github.event.number }} \ No newline at end of file + run: ./gradlew build sonar --info -Dsonar.pullrequest.key=${{ GITEA_PULL_REQUEST_INDEX }} \ No newline at end of file -- 2.45.2 From 996cb32225a09726ba42ad9e54392c252a8a2084 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 10:56:31 +0000 Subject: [PATCH 07/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 6b96eb2..0eeaa39 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -40,4 +40,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info -Dsonar.pullrequest.key=${{ GITEA_PULL_REQUEST_INDEX }} \ No newline at end of file + run: ./gradlew build sonar --info -Dsonar.pullrequest.key=$GITEA_PULL_REQUEST_INDEX \ No newline at end of file -- 2.45.2 From b208c9d3f0f053c9fb56a9a7c1b67af8bef845b8 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Thu, 26 Sep 2024 11:04:40 +0000 Subject: [PATCH 08/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0eeaa39..d1eb2a2 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -2,6 +2,11 @@ name: Build on: # test pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review push: branches: - main @@ -40,4 +45,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info -Dsonar.pullrequest.key=$GITEA_PULL_REQUEST_INDEX \ No newline at end of file + run: ./gradlew build sonar --info \ No newline at end of file -- 2.45.2 From 86359cd1757c10c9653de43ff1dba183274fc804 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Fri, 27 Sep 2024 08:37:06 +0000 Subject: [PATCH 09/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d1eb2a2..46dfe86 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -45,4 +45,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info \ No newline at end of file + run: ./gradlew build sonar --info -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} -Dsonar.pullrequest.key=${{github.event.pull_request.number}} \ No newline at end of file -- 2.45.2 From fb13b9dd852e9c7e7eb30737262c2d9f36f0a72d Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Fri, 27 Sep 2024 08:43:44 +0000 Subject: [PATCH 10/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 46dfe86..bf5f185 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,12 +1,6 @@ name: Build -on: # test - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review +on: push: branches: - main -- 2.45.2 From 289cd3ff6d1209930a5ffa01b2777f0141ddd738 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Fri, 27 Sep 2024 08:44:10 +0000 Subject: [PATCH 11/12] Add .gitea/workflows/build-pr.yml --- .gitea/workflows/build-pr.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/build-pr.yml diff --git a/.gitea/workflows/build-pr.yml b/.gitea/workflows/build-pr.yml new file mode 100644 index 0000000..ffb5436 --- /dev/null +++ b/.gitea/workflows/build-pr.yml @@ -0,0 +1,45 @@ +name: Build PR + +on: # test + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + +jobs: + build: + name: Build and analyze + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 21 + uses: actions/setup-java@v1 + with: + java-version: 21 + - name: Cache SonarQube packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + - name: Coverage + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: ./gradlew test jacocoTestReport sonar + - name: Build and analyze + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: ./gradlew build sonar --info -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} -Dsonar.pullrequest.key=${{github.event.pull_request.number}} \ No newline at end of file -- 2.45.2 From fcfcf735a8e52b7398aa839ee104ced3adeab645 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Fri, 27 Sep 2024 08:44:42 +0000 Subject: [PATCH 12/12] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index bf5f185..5e9e1cf 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -39,4 +39,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonar --info -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} -Dsonar.pullrequest.key=${{github.event.pull_request.number}} \ No newline at end of file + run: ./gradlew build sonar --info \ No newline at end of file -- 2.45.2