Skip to content

Commit 14aaf7b

Browse files
committed
ci test
1 parent 0d0583a commit 14aaf7b

File tree

2 files changed

+87
-16
lines changed

2 files changed

+87
-16
lines changed

Diff for: .github/workflows/blossom-ci.yml

+30-16
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ on:
2020
types: [created]
2121
workflow_dispatch:
2222
inputs:
23-
platform:
24-
description: 'runs-on argument'
25-
required: false
26-
args:
27-
description: 'argument'
23+
sha:
24+
description: 'commit sha'
25+
required: true
26+
test_results_url:
27+
description: 'test results url'
2828
required: false
2929
jobs:
3030
Authorization:
@@ -35,7 +35,7 @@ jobs:
3535

3636
# This job only runs for pull request comments
3737
if: |
38-
github.event.comment.body == '/build' && (github.actor == 'niukuo' || github.actor == 'niukuo')
38+
github.event.comment.body == '/build' && contains('["niukuo"]', github.actor)
3939
steps:
4040
- name: Check if comment is issued by authorized person
4141
run: blossom-ci
@@ -78,14 +78,28 @@ jobs:
7878
CI_SERVER: ${{ secrets.CI_SERVER }}
7979
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8080

81-
Upload-Log:
82-
name: Upload log
83-
runs-on: blossom
84-
if : github.event_name == 'workflow_dispatch'
81+
Upload-Test:
82+
name: Upload test results
83+
runs-on: niukuo
84+
if: github.event_name == 'workflow_dispatch'
8585
steps:
86-
- name: Jenkins log for pull request ${{ fromJson(github.event.inputs.args).pr }} (click here)
87-
run: blossom-ci
88-
env:
89-
OPERATION: 'POST-PROCESSING'
90-
CI_SERVER: ${{ secrets.CI_SERVER }}
91-
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
- name: Collect test result
87+
run: rm -rf results && mkdir results && cd results && curl -L ${{ github.event.inputs.test_results_url }} | tar -xz
88+
- name: Create test summary
89+
id: test_summary
90+
uses: test-summary/action@dist
91+
with:
92+
paths: results/**/results*.xml
93+
- name: Update commit status
94+
uses: actions/github-script@v6
95+
with:
96+
script: |
97+
github.rest.repos.createCommitStatus({
98+
owner: context.repo.owner,
99+
repo: context.repo.repo,
100+
context: 'blossom-ci',
101+
sha: '${{ github.event.inputs.sha }}',
102+
target_url: 'https://github.com/NVIDIA/TensorRT-LLM/actions/runs/' + context.runId,
103+
state: '${{ steps.test_summary.outputs.failed == 0 && 'success' || 'failure' }}',
104+
description: '${{ steps.test_summary.outputs.passed }} passed, ${{ steps.test_summary.outputs.failed }} failed, ${{ steps.test_summary.outputs.skipped }} skipped',
105+
})

Diff for: .github/workflows/blossom-test.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Blossom-Test
17+
on:
18+
workflow_dispatch:
19+
inputs:
20+
test_results_url:
21+
description: 'test results url'
22+
required: false
23+
sha:
24+
description: 'commit sha'
25+
required: true
26+
jobs:
27+
Upload-Test:
28+
name: Upload test results
29+
runs-on: niukuo
30+
if: github.event_name == 'workflow_dispatch' && false
31+
steps:
32+
- name: Collect test result
33+
run: rm -rf results && mkdir results && cd results && curl -L ${{ github.event.inputs.test_results_url }} | tar -xz
34+
- name: Jenkins log for commit ${{ github.event.inputs.sha }} (click here)
35+
uses: mikepenz/action-junit-report@v5
36+
with:
37+
report_paths: 'results/**/results*.xml'
38+
include_passed: false
39+
Update-Status:
40+
name: Update test status
41+
runs-on: ubuntu-latest
42+
if: github.event_name == 'workflow_dispatch'
43+
steps:
44+
- name: Update pr status
45+
id: set-result
46+
uses: actions/github-script@v6
47+
with:
48+
script: |
49+
github.rest.repos.createCommitStatus({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
context: 'blossom-ci',
53+
sha: github.event.inputs.sha,
54+
target_url: github.context.runId,
55+
description: 'test done',
56+
})
57+

0 commit comments

Comments
 (0)