Skip to content

Commit

Permalink
ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
niukuo committed Jan 24, 2025
1 parent 0d0583a commit 9586a21
Showing 1 changed file with 34 additions and 17 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/blossom-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ on:
types: [created]
workflow_dispatch:
inputs:
platform:
description: 'runs-on argument'
required: false
args:
description: 'argument'
required: false
sha:
description: 'commit sha'
required: true
test_result:
description: 'test result'
required: true
test_results_url:
description: 'test results url'
required: true
jobs:
Authorization:
name: Authorization
Expand All @@ -35,7 +38,7 @@ jobs:

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

Upload-Log:
name: Upload log
runs-on: blossom
if : github.event_name == 'workflow_dispatch'
Upload-Test:
name: Upload test results
runs-on: niukuo
if: github.event_name == 'workflow_dispatch'
steps:
- name: Jenkins log for pull request ${{ fromJson(github.event.inputs.args).pr }} (click here)
run: blossom-ci
env:
OPERATION: 'POST-PROCESSING'
CI_SERVER: ${{ secrets.CI_SERVER }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Collect test result
run: rm -rf results && mkdir results && cd results && curl -L ${{ github.event.inputs.test_results_url }} | tar -xz
- name: Create test summary
id: test_summary
uses: test-summary/action@dist
with:
paths: results/**/results*.xml
- name: Update commit status
uses: actions/github-script@v6
with:
script: |
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
context: 'blossom-ci',
sha: '${{ github.event.inputs.sha }}',
target_url: 'https://github.com/NVIDIA/TensorRT-LLM/actions/runs/' + context.runId,
state: '${{ steps.test_summary.outputs.failed > 0 && 'failure' || github.event.inputs.test_result || 'success' }}',
description: '${{ steps.test_summary.outputs.passed }} passed, ${{ steps.test_summary.outputs.failed }} failed, ${{ steps.test_summary.outputs.skipped }} skipped',
})

0 comments on commit 9586a21

Please sign in to comment.