Skip to content

Commit fcd121b

Browse files
committed
CI on forked branches
1 parent 8800660 commit fcd121b

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,9 @@ jobs:
131131
env:
132132
LC_ALL: "C.UTF-8"
133133
SBT_MEM: "3072"
134+
- name: Upload test results to report
135+
if: always()
136+
uses: actions/upload-artifact@v7
137+
with:
138+
name: test-results-sql_core-1-spark${{ inputs.spark-short }}-jdk${{ inputs.java }}
139+
path: "**/target/test-reports/*.xml"

.github/workflows/test_report.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Modelled on Apache Spark's test_report.yml. The "Build" workflow runs in the
19+
# contributor's fork (no upstream privileges); this workflow runs in the
20+
# upstream context via workflow_run, downloads the test XML artifacts the fork
21+
# uploaded, and posts the surefire report as a check run on the PR commit.
22+
23+
name: Report test results
24+
on:
25+
workflow_run:
26+
workflows: ["Build"]
27+
types:
28+
- completed
29+
30+
jobs:
31+
test_report:
32+
if: github.event.workflow_run.conclusion != 'skipped'
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Download test results to report
36+
uses: dawidd6/action-download-artifact@09385b76de790122f4da9c82b17bccf858b9557c # pin@v2
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
workflow: ${{ github.event.workflow_run.workflow_id }}
40+
commit: ${{ github.event.workflow_run.head_commit.id }}
41+
workflow_conclusion: completed
42+
- name: Publish test report
43+
uses: scacap/action-surefire-report@482f012643ed0560e23ef605a79e8e87ca081648 # pin@v1
44+
with:
45+
check_name: Report test results
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
report_paths: "**/target/test-reports/*.xml"
48+
commit: ${{ github.event.workflow_run.head_commit.id }}

0 commit comments

Comments
 (0)