kou commented on code in PR #45887:
URL: https://github.com/apache/arrow/pull/45887#discussion_r2008981256
##########
.github/workflows/cpp.yml:
##########
@@ -360,6 +374,12 @@ jobs:
# For ORC
export TZDIR=/c/msys64/usr/share/zoneinfo
ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
+ - name: Upload Test Results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-cpp-windows-${{ matrix.simd-level }}
+ path: './build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}'
Review Comment:
```suggestion
path: build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}
```
##########
docker-compose.yml:
##########
@@ -1434,7 +1439,7 @@ services:
LANG: "C.UTF-8"
BUILD_DOCS_CPP: "ON"
BUILD_DOCS_PYTHON: "ON"
- PYTEST_ARGS: "--doctest-modules --doctest-cython"
+ PYTEST_ARGS: "--doctest-modules --doctest-cython --junit-xml
/arrow/python/pytest.xml"
Review Comment:
This writes a file to source directory, right?
Can we avoid writing to source directory? For example, can we use `/build`
or something?
##########
.github/workflows/cpp.yml:
##########
@@ -468,3 +488,19 @@ jobs:
shell: msys2 {0}
run: |
ci/scripts/cpp_test.sh "$(pwd)" "$(pwd)/build"
+ - name: Upload Test Results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-cpp-windows-mingw-${{ matrix.msystem_lower }}
+ path: './build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}'
+
+ event_file:
+ name: "Event File"
Review Comment:
```suggestion
name: Event File
```
##########
.github/workflows/cpp.yml:
##########
@@ -153,6 +155,12 @@ jobs:
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
continue-on-error: true
run: archery docker push ${{ matrix.image }}
+ - name: Upload Test Results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-cpp-docker-${{ matrix.image }}
+ path: './cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}'
Review Comment:
```suggestion
path: cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}
```
##########
.github/workflows/cpp.yml:
##########
@@ -66,6 +66,7 @@ permissions:
env:
ARCHERY_DEBUG: 1
ARROW_ENABLE_TIMING_TESTS: OFF
+ ARROW_CTEST_OUTPUT_JUNIT: junit-results.xml
Review Comment:
Could you keep this list in alphabetical order?
##########
.github/workflows/test-results.yml:
##########
@@ -0,0 +1,72 @@
+# 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
+#
+# http://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: Test Results
+run-name: Test Results (${{ github.event.workflow.name }}) [${{
github.event.workflow_run.event }}]
+
+on:
+ workflow_run:
+ workflows:
+ - 'C\+\+'
Review Comment:
Do we need to escape `+` here?
##########
.github/workflows/python.yml:
##########
@@ -123,6 +123,7 @@ jobs:
env:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
+ PYTEST_ARGS: --junit-xml /arrow/python/pytest.xml
Review Comment:
Does this overwrite `PYTEST_ARGS` in `docker-compose.yml`?
##########
.github/workflows/cpp.yml:
##########
@@ -468,3 +488,19 @@ jobs:
shell: msys2 {0}
run: |
ci/scripts/cpp_test.sh "$(pwd)" "$(pwd)/build"
+ - name: Upload Test Results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-cpp-windows-mingw-${{ matrix.msystem_lower }}
+ path: './build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}'
+
+ event_file:
+ name: "Event File"
+ runs-on: ubuntu-latest
+ steps:
+ - name: Upload
+ uses: actions/upload-artifact@v4
+ with:
+ name: Event
Review Comment:
Can we use lower case like other `upload-artifact`'s `name`?
```suggestion
name: event
```
##########
.github/workflows/cpp.yml:
##########
@@ -137,6 +138,7 @@ jobs:
env:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
+ ARROW_CTEST_OUTPUT_JUNIT: /arrow/cpp/${{
env.ARROW_CTEST_OUTPUT_JUNIT }}
Review Comment:
Can we use different environment name for them?
How about using `ARROW_CTEST_OUTPUT_JUNIT_BASENAME` or something for the
top-level `ARROW_CTEST_OUTPUT_JUNIT`?
##########
.github/workflows/test-results.yml:
##########
@@ -0,0 +1,68 @@
+# 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
+#
+# http://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: Test Results
+run-name: Test Results (${{ github.event.workflow.name }}) [${{
github.event.workflow_run.event }}]
+
+on:
+ workflow_run:
+ workflows:
+ - 'C\+\+'
+ - 'C#'
+ - 'NodeJS'
+ - 'Python'
+ types:
+ - completed
+permissions: {}
+
+jobs:
+ test-results:
+ name: Test Results
+ runs-on: ubuntu-latest
+ if: github.event.workflow_run.conclusion != 'skipped'
+
+ permissions:
+ checks: write
+
+ # needed unless run with comment_mode: off
+ pull-requests: write
+
+ # only needed for private repository
+ contents: read
+
+ # only needed for private repository
+ issues: read
+
+ # required by download step to access artifacts API
+ actions: read
+
+ steps:
+ - name: Download and Extract Artifacts
+ uses:
dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
+ with:
+ run_id: ${{ github.event.workflow_run.id }}
+ path: artifacts
+
+ - name: Publish Test Results
+ uses: EnricoMi/publish-unit-test-result-action@v2
+ with:
+ commit: ${{ github.event.workflow_run.head_sha }}
+ check_name: Test Results (${{ github.event.workflow.name }}) [${{
github.event.workflow_run.event }}]
+ comment_mode: ${{ github.event.workflow_run.event == 'pull_request'
&& 'always' || 'off' }}
Review Comment:
A pull request from fork can change
EnricoMi/publish-unit-test-result-action's input by changing
`.github/workflows/*.yml`, right?
Is it safe for an evil pull request? For example, an pull request that
generates a result XML that includes an evil link or an event file that uses an
evil commit ID.
##########
.github/workflows/cpp.yml:
##########
@@ -468,3 +488,19 @@ jobs:
shell: msys2 {0}
run: |
ci/scripts/cpp_test.sh "$(pwd)" "$(pwd)/build"
+ - name: Upload Test Results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-cpp-windows-mingw-${{ matrix.msystem_lower }}
+ path: './build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}'
Review Comment:
```suggestion
path: build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}
```
##########
.github/workflows/cpp.yml:
##########
@@ -264,6 +272,12 @@ jobs:
sudo sysctl -w kern.corefile=/tmp/core.%N.%P
ulimit -c unlimited # must enable within the same shell
ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
+ - name: Upload Test Results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: test-results-cpp-macos-${{ matrix.architecture }}-${{
matrix.macos-version }}
+ path: './build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}'
Review Comment:
```suggestion
path: build/cpp/${{ env.ARROW_CTEST_OUTPUT_JUNIT }}
```
##########
docker-compose.yml:
##########
@@ -1710,6 +1715,7 @@ services:
environment:
<<: *common
BUILD_DOCS_JS: "ON"
+ TEST_REPORT_PATH: # inherit
Review Comment:
jest-junit-reporter uses this environment name, right?
Can we add a comment why we use this name?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]