Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuangnm authored and dhuangnm committed Sep 12, 2024
1 parent 99b1c0a commit a5b00f2
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
timeout: 20
secrets: inherit

# TEST-NIGHTLY:
# TEST:
# needs: [BUILD]
# strategy:
# fail-fast: false
# matrix:
# test_config: ${{ fromJson(inputs.test_configs) }}
# uses: ./.github/workflows/test-nightly.yml
# uses: ./.github/workflows/test.yml
# with:
# gitref: ${{ inputs.gitref }}
# test_label: ${{ matrix.test_config.label }}
Expand All @@ -57,7 +57,7 @@ jobs:
# secrets: inherit

# UPLOAD:
# needs: TEST-NIGHTLY
# needs: TEST
# uses: ./.github/workflows/upload.yml
# with:
# label: k8s-util
Expand Down
129 changes: 129 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: nightly test
on:
# makes workflow reusable
workflow_call:
inputs:
gitref:
description: "git commit hash or branch name"
type: string
required: true
test_label:
description: "requested runner label"
type: string
required: true
python:
description: "python version, e.g. 3.10.12"
type: string
required: true
timeout:
description: "time limit for run in minutes "
type: string
required: true
whl:
description: "whl to test (variable appears late binding so unusable outside 'download artifact')"
type: string
required: true
testmo_run_id:
description: "testmo run id"
type: string
default: ''

# makes workflow manually callable
workflow_dispatch:
inputs:
gitref:
description: "git commit hash or branch name"
type: string
required: true
test_label:
description: "requested runner label"
type: string
required: true
python:
description: "python version, e.g. 3.10.12"
type: string
required: true
timeout:
description: "time limit for run in minutes "
type: string
required: true
whl:
description: "whl to test (variable appears late binding so unusable outside 'download artifact')"
type: string
required: true
testmo_run_id:
description: "testmo run id"
type: string
default: ''

jobs:

TEST:

name: TEST (${{ inputs.python}}, ${{ inputs.test_label }})
runs-on: ${{ inputs.test_label }}
timeout-minutes: ${{ fromJson(inputs.timeout) }}

steps:

- name: set python
id: set_python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}

- name: verify python
id: verify_python
uses: neuralmagic/nm-actions/actions/verify-python@newadd
with:
python-version: ${{ inputs.python }}

- name: checkout code
id: checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.gitref }}

- name: create virtualenv
id: create_venv
uses: neuralmagic/nm-actions/actions/create-virtualenv@newadd
with:
venv: TEST

- name: install testmo
uses: neuralmagic/nm-actions/actions/install-testmo@v1.0.0

- name: download whl
id: download
uses: actions/download-artifact@v4
with:
name: ${{ inputs.whl }}
path: ${{ inputs.whl }}

- name: run tests
id: test
uses: ./.github/actions/test/
with:
venv: ${{ steps.create_venv.outputs.penv }}

- name: report test results
id: report_test
uses: neuralmagic/nm-actions/actions/testmo-run-submit-thread@newadd
if: (success() || failure()) && ${{ inputs.testmo_run_id != '' }}
with:
testmo_url: https://neuralmagic.testmo.net
testmo_token: ${{ secrets.TESTMO_TEST_TOKEN }}
testmo_run_id: ${{ inputs.testmo_run_id }}
results: llm-compressor/test-results
step_status: ${{ steps.test.outputs.status }}

- name: summary
uses: neuralmagic/nm-actions/actions/summary-test@newadd
if: success() || failure()
with:
test_label: ${{ inputs.test_label }}
gitref: ${{ inputs.gitref }}
testmo_run_url: https://neuralmagic.testmo.net/automation/runs/view/${{ inputs.testmo_run_id }}
python: ${{ inputs.python }}
whl: ${{ inputs.whl }}
test_status: ${{ steps.test.outputs.status }}

0 comments on commit a5b00f2

Please sign in to comment.