From 3a70924c524f280c8e15e361272742544022b59e Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 22:58:07 +0300 Subject: [PATCH 1/9] Add test reporter --- .github/workflows/command-service.yml | 12 +++++++++++- .github/workflows/query-service.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index e5b4095..2109d43 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -63,11 +63,21 @@ jobs: - name: Run tests run: mvn -pl command-service -am verify + - name: Report all test results + if: success() || failure() + uses: dorny/test-reporter@v1 + with: + name: command-service-test-reports-dorny + path: | + **/target/surefire-reports/*.xml + **/target/failsafe-reports/*.xml + reporter: java-junit + - name: Archive test reports uses: actions/upload-artifact@v4 if: success() || failure() with: - name: command-test-reports + name: command-service-test-reports path: | **/target/surefire-reports/ **/target/failsafe-reports/ diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index 24c6bad..3e08131 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -63,11 +63,21 @@ jobs: - name: Run tests run: mvn -pl query-service -am verify + - name: Report all test results + if: success() || failure() + uses: dorny/test-reporter@v1 + with: + name: query-service-test-reports-dorny + path: | + **/target/surefire-reports/*.xml + **/target/failsafe-reports/*.xml + reporter: java-junit + - name: Archive test reports uses: actions/upload-artifact@v4 if: success() || failure() with: - name: query-test-reports + name: query-service-test-reports path: | **/target/surefire-reports/ **/target/failsafe-reports/ From 1894386cdf96cc9d004712f24b7965ab74a489a9 Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:04:58 +0300 Subject: [PATCH 2/9] Use explicit directories --- .github/workflows/command-service.yml | 6 +++--- .github/workflows/query-service.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 2109d43..74788fd 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -64,13 +64,13 @@ jobs: run: mvn -pl command-service -am verify - name: Report all test results - if: success() || failure() uses: dorny/test-reporter@v1 + if: success() || failure() with: name: command-service-test-reports-dorny path: | - **/target/surefire-reports/*.xml - **/target/failsafe-reports/*.xml + command-service/target/surefire-reports/*.xml + command-service/target/failsafe-reports/*.xml reporter: java-junit - name: Archive test reports diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index 3e08131..618d160 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -64,13 +64,13 @@ jobs: run: mvn -pl query-service -am verify - name: Report all test results - if: success() || failure() uses: dorny/test-reporter@v1 + if: success() || failure() with: name: query-service-test-reports-dorny path: | - **/target/surefire-reports/*.xml - **/target/failsafe-reports/*.xml + query-service/target/surefire-reports/*.xml + query-service/target/failsafe-reports/*.xml reporter: java-junit - name: Archive test reports From 997f19327856b91ed0beb7bfbad9dbb504230eea Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:14:18 +0300 Subject: [PATCH 3/9] Add debug info --- .github/workflows/command-service.yml | 9 +++++++++ command-api/pom.xml | 3 +++ query-api/pom.xml | 3 +++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 74788fd..a083988 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -63,6 +63,15 @@ jobs: - name: Run tests run: mvn -pl command-service -am verify + - name: Diagnostic info + run: | + echo "=== Текущая директория ===" + pwd + echo "=== Содержимое текущей директории ===" + ls -la + echo "=== Полное дерево файлов ===" + find . + - name: Report all test results uses: dorny/test-reporter@v1 if: success() || failure() diff --git a/command-api/pom.xml b/command-api/pom.xml index d9106e3..8836c35 100644 --- a/command-api/pom.xml +++ b/command-api/pom.xml @@ -51,6 +51,9 @@ com.github.gantsign.maven ktlint-maven-plugin + + false + diff --git a/query-api/pom.xml b/query-api/pom.xml index a380313..ebc672f 100644 --- a/query-api/pom.xml +++ b/query-api/pom.xml @@ -118,6 +118,9 @@ com.github.gantsign.maven ktlint-maven-plugin + + false + From 0f481cef1bafde12f00a524213b86ba4697b0dbe Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:26:37 +0300 Subject: [PATCH 4/9] Add comma --- .github/workflows/command-service.yml | 3 ++- .github/workflows/query-service.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index a083988..9ee8052 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -78,9 +78,10 @@ jobs: with: name: command-service-test-reports-dorny path: | - command-service/target/surefire-reports/*.xml + command-service/target/surefire-reports/*.xml, command-service/target/failsafe-reports/*.xml reporter: java-junit + fail-on-empty: 'false' - name: Archive test reports uses: actions/upload-artifact@v4 diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index 618d160..2ae030d 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -69,9 +69,10 @@ jobs: with: name: query-service-test-reports-dorny path: | - query-service/target/surefire-reports/*.xml + query-service/target/surefire-reports/*.xml, query-service/target/failsafe-reports/*.xml reporter: java-junit + fail-on-empty: 'false' - name: Archive test reports uses: actions/upload-artifact@v4 From fbe6bfc93efd0ac594465bb8aafc11eb363d2c51 Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:35:59 +0300 Subject: [PATCH 5/9] Add permissions --- .github/workflows/command-service.yml | 3 +++ .github/workflows/query-service.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 9ee8052..997dccf 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -43,6 +43,9 @@ jobs: test: needs: build runs-on: ubuntu-latest + permissions: + contents: read + checks: write steps: - name: Checkout repository diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index 2ae030d..676cb71 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -43,6 +43,9 @@ jobs: test: needs: build runs-on: ubuntu-latest + permissions: + contents: read + checks: write steps: - name: Checkout repository From 54c9c3144c4182656eb798dbf92f9bc5587d236d Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:41:34 +0300 Subject: [PATCH 6/9] Rename checks --- .github/workflows/command-service.yml | 2 +- .github/workflows/query-service.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 997dccf..233971f 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -79,7 +79,7 @@ jobs: uses: dorny/test-reporter@v1 if: success() || failure() with: - name: command-service-test-reports-dorny + name: test-reports path: | command-service/target/surefire-reports/*.xml, command-service/target/failsafe-reports/*.xml diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index 676cb71..a5c2eac 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -70,7 +70,7 @@ jobs: uses: dorny/test-reporter@v1 if: success() || failure() with: - name: query-service-test-reports-dorny + name: test-reports path: | query-service/target/surefire-reports/*.xml, query-service/target/failsafe-reports/*.xml From 1913871deaac95f6c080a6e0e329af0983ed2a15 Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:45:42 +0300 Subject: [PATCH 7/9] Revert "Rename checks" This reverts commit 54c9c3144c4182656eb798dbf92f9bc5587d236d. --- .github/workflows/command-service.yml | 2 +- .github/workflows/query-service.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 233971f..997dccf 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -79,7 +79,7 @@ jobs: uses: dorny/test-reporter@v1 if: success() || failure() with: - name: test-reports + name: command-service-test-reports-dorny path: | command-service/target/surefire-reports/*.xml, command-service/target/failsafe-reports/*.xml diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index a5c2eac..676cb71 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -70,7 +70,7 @@ jobs: uses: dorny/test-reporter@v1 if: success() || failure() with: - name: test-reports + name: query-service-test-reports-dorny path: | query-service/target/surefire-reports/*.xml, query-service/target/failsafe-reports/*.xml From 92598e92994902688b8012bdaab80541972c1b9a Mon Sep 17 00:00:00 2001 From: mayosen Date: Fri, 8 Aug 2025 23:51:20 +0300 Subject: [PATCH 8/9] Delete debug info --- .github/workflows/command-service.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 997dccf..28b7f0f 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -66,15 +66,6 @@ jobs: - name: Run tests run: mvn -pl command-service -am verify - - name: Diagnostic info - run: | - echo "=== Текущая директория ===" - pwd - echo "=== Содержимое текущей директории ===" - ls -la - echo "=== Полное дерево файлов ===" - find . - - name: Report all test results uses: dorny/test-reporter@v1 if: success() || failure() From 931590417a30b15420894318f4b39fa82b259b89 Mon Sep 17 00:00:00 2001 From: mayosen Date: Sat, 9 Aug 2025 00:05:21 +0300 Subject: [PATCH 9/9] Add details to step --- .github/workflows/command-service.yml | 9 ++++++++- .github/workflows/query-service.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/command-service.yml b/.github/workflows/command-service.yml index 28b7f0f..214de0c 100644 --- a/.github/workflows/command-service.yml +++ b/.github/workflows/command-service.yml @@ -67,16 +67,23 @@ jobs: run: mvn -pl command-service -am verify - name: Report all test results + id: reporter uses: dorny/test-reporter@v1 if: success() || failure() with: - name: command-service-test-reports-dorny + name: 'Command service tests #${{ github.run_number }}' path: | command-service/target/surefire-reports/*.xml, command-service/target/failsafe-reports/*.xml reporter: java-junit fail-on-empty: 'false' + - name: Add link to check run in job summary + if: success() || failure() + run: | + echo "### 🧪 Test report (check run)" >> $GITHUB_STEP_SUMMARY + echo "${{ steps.reporter.outputs.url_html }}" >> $GITHUB_STEP_SUMMARY + - name: Archive test reports uses: actions/upload-artifact@v4 if: success() || failure() diff --git a/.github/workflows/query-service.yml b/.github/workflows/query-service.yml index 676cb71..73f0b6f 100644 --- a/.github/workflows/query-service.yml +++ b/.github/workflows/query-service.yml @@ -67,16 +67,23 @@ jobs: run: mvn -pl query-service -am verify - name: Report all test results + id: reporter uses: dorny/test-reporter@v1 if: success() || failure() with: - name: query-service-test-reports-dorny + name: 'Query service tests #${{ github.run_number }}' path: | query-service/target/surefire-reports/*.xml, query-service/target/failsafe-reports/*.xml reporter: java-junit fail-on-empty: 'false' + - name: Add link to check run in job summary + if: success() || failure() + run: | + echo "### 🧪 Test report (check run)" >> $GITHUB_STEP_SUMMARY + echo "${{ steps.reporter.outputs.url_html }}" >> $GITHUB_STEP_SUMMARY + - name: Archive test reports uses: actions/upload-artifact@v4 if: success() || failure()