You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2023/06/07 08:06:23 UTC

[plc4x] branch develop updated: chore(build): put test report in separate workflow

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 9cf3b3435a chore(build): put test report in separate workflow
9cf3b3435a is described below

commit 9cf3b3435a4cdcaa8a9300ef3504504bf10ed6ce
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Jun 7 10:06:10 2023 +0200

    chore(build): put test report in separate workflow
---
 .github/workflows/go-platform-test-report.yml   | 41 +++++++++++++++++++++++++
 .github/workflows/go-platform.yml               | 15 ++++-----
 .github/workflows/java-platform-test-report.yml | 41 +++++++++++++++++++++++++
 .github/workflows/java-platform.yml             | 17 ++++++----
 4 files changed, 99 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/go-platform-test-report.yml b/.github/workflows/go-platform-test-report.yml
new file mode 100644
index 0000000000..e975e3bbbf
--- /dev/null
+++ b/.github/workflows/go-platform-test-report.yml
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+name: 'Golang Platform Test Report'
+
+on:
+  workflow_run:
+    workflows: [ 'Go Platform compatibility' ]
+    types:
+      - completed
+jobs:
+  report:
+    strategy:
+      matrix:
+        # 8 not anymore supported for building
+        java: [ 17 ]
+        os: [ ubuntu-latest, macos-latest, windows-latest ]
+      fail-fast: false
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: dorny/test-reporter@v1
+        with:
+          artifact: "golang-test-report-${{ matrix.os }}"
+          name: "Golang Tests (OS: ${{ matrix.os }})"
+          path: '*.xml'
+          reporter: java-junit
\ No newline at end of file
diff --git a/.github/workflows/go-platform.yml b/.github/workflows/go-platform.yml
index 79ccfd2d34..0ca271c92e 100644
--- a/.github/workflows/go-platform.yml
+++ b/.github/workflows/go-platform.yml
@@ -133,26 +133,23 @@ jobs:
         run: |
           ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-go,enable-all-checks' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install
 
-      - name: Test Report (first failure)
-        uses: dorny/test-reporter@v1
+      - name: Upload Test Report (first failure)
+        uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: "Golang Tests (OS: ${{ matrix.os }}) (first failure)"
+          name: "golang-test-report-first-failure-${{ matrix.os }}"
           path: '**/go-junit-report.xml'
-          reporter: java-junit
-          fail-on-error: false
 
       - name: Run mvnv without BacNet regression tests
         if: ${{ failure() }}
         run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-go,skip-bacnet-regression-test' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install
 
-      - name: Test Report
-        uses: dorny/test-reporter@v1
+      - name: Upload Test Report
+        uses: actions/upload-artifact@v3
         if: success() || failure()
         with:
-          name: "Golang Tests (OS: ${{ matrix.os }})"
+          name: "golang-test-report-${{ matrix.os }}"
           path: '**/go-junit-report.xml'
-          reporter: java-junit
 
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/java-platform-test-report.yml b/.github/workflows/java-platform-test-report.yml
new file mode 100644
index 0000000000..75b9d139d3
--- /dev/null
+++ b/.github/workflows/java-platform-test-report.yml
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+name: 'Golang Platform Test Report'
+
+on:
+  workflow_run:
+    workflows: [ 'Java Platform compatibility' ]
+    types:
+      - completed
+jobs:
+  report:
+    strategy:
+      matrix:
+        # 8 not anymore supported for building
+        java: [ 11, 17, 18 ]
+        os: [ ubuntu-latest, macos-latest, windows-latest ]
+      fail-fast: false
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: dorny/test-reporter@v1
+        with:
+          artifact: "java-test-report-${{ matrix.os }}-java-${{ matrix.java }}"
+          name: "Java Tests (OS: ${{ matrix.os }}, Java: ${{ matrix.java }})"
+          path: '*.xml'
+          reporter: java-junit
\ No newline at end of file
diff --git a/.github/workflows/java-platform.yml b/.github/workflows/java-platform.yml
index 05574fc159..bb0961e130 100644
--- a/.github/workflows/java-platform.yml
+++ b/.github/workflows/java-platform.yml
@@ -130,18 +130,23 @@ jobs:
         run: |
           ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install
 
+      - name: Upload Test Report (first failure)
+        uses: actions/upload-artifact@v3
+        if: failure()
+        with:
+          name: "java-test-report-first-failure-${{ matrix.os }}-java-${{ matrix.java }}"
+          path: '**/(surefire|failsafe)-reports/TEST-*.xml'
+
       - name: Run mvnv without BacNet regression tests
         if: ${{ failure() }}
         run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'skip-bacnet-regression-test' ${{ steps.platform_opts.outputs.platform_opts }} install
 
-      - name: Test Report
-        uses: dorny/test-reporter@v1
-        # TODO: apparently the reporter only works on windows
-        if: (success() || failure()) && matrix.os == 'windows-latest'
+      - name: Upload Test Report
+        uses: actions/upload-artifact@v3
+        if: success() || failure()
         with:
-          name: "Java Tests (OS: ${{ matrix.os }}, Java: ${{ matrix.java }})"
+          name: "java-test-report-${{ matrix.os }}-java-${{ matrix.java }}"
           path: '**/(surefire|failsafe)-reports/TEST-*.xml'
-          reporter: java-junit
 
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@v2