-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1792 from microsoft/staging
Staging to main, prepare for release 1.1.1
- Loading branch information
Showing
11 changed files
with
400 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# --------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
# --------------------------------------------------------- | ||
|
||
name: azureml-tests | ||
description: "Submit experiment to AzureML cluster" | ||
inputs: | ||
# azureml experiment name | ||
EXP_NAME: | ||
required: true | ||
type: string | ||
# type of test - unit or nightly | ||
TEST_KIND: | ||
required: true | ||
type: string | ||
# test environment - cpu, gpu or spark | ||
TEST_ENV: | ||
required: false | ||
type: string | ||
# azureml compute credentials | ||
AZUREML_TEST_CREDENTIALS: | ||
required: true | ||
type: string | ||
# azureml compute subid | ||
AZUREML_TEST_SUBID: | ||
required: true | ||
type: string | ||
# python version | ||
PYTHON_VERSION: | ||
required: true | ||
type: string | ||
# test group name | ||
TEST_GROUP: | ||
required: true | ||
type: string | ||
# cpu cluster name | ||
CPU_CLUSTER_NAME: | ||
required: false | ||
type: string | ||
default: "cpu-cluster" | ||
# gpu cluster name | ||
GPU_CLUSTER_NAME: | ||
required: false | ||
type: string | ||
default: "gpu-cluster" | ||
# AzureML resource group name | ||
RG: | ||
required: false | ||
type: string | ||
default: "recommenders_project_resources" | ||
# AzureML workspace name | ||
WS: | ||
required: false | ||
type: string | ||
default: "azureml-test-workspace" | ||
# test logs path | ||
TEST_LOGS_PATH: | ||
required: false | ||
type: string | ||
default: '"test_logs.log"' | ||
# pytest exit code | ||
PYTEST_EXIT_CODE: | ||
required: false | ||
type: string | ||
default: "pytest_exit_code.log" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Install azureml-core and azure-cli on a GitHub hosted server | ||
shell: bash | ||
run: pip install azureml-core azure-cli | ||
- name: Log in to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{inputs.AZUREML_TEST_CREDENTIALS}} | ||
- name: Install wheel package | ||
shell: bash | ||
run: pip install wheel | ||
- name: Create wheel from setup.py | ||
shell: bash | ||
run: python setup.py bdist_wheel | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
- name: Submit CPU tests to AzureML | ||
shell: bash | ||
if: contains(inputs.TEST_GROUP, 'cpu') | ||
run: >- | ||
python tests/ci/azureml_tests/submit_groupwise_azureml_pytest.py --clustername ${{inputs.CPU_CLUSTER_NAME}} | ||
--subid ${{inputs.AZUREML_TEST_SUBID}} --reponame "recommenders" --branch ${{ steps.extract_branch.outputs.branch }} | ||
--rg ${{inputs.RG}} --wsname ${{inputs.WS}} --expname ${{inputs.EXP_NAME}}_${{inputs.TEST_GROUP}} | ||
--testlogs ${{inputs.TEST_LOGS_PATH}} --testkind ${{inputs.TEST_KIND}} | ||
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}} | ||
- name: Submit GPU tests to AzureML | ||
shell: bash | ||
if: contains(inputs.TEST_GROUP, 'gpu') | ||
run: >- | ||
python tests/ci/azureml_tests/submit_groupwise_azureml_pytest.py --clustername ${{inputs.GPU_CLUSTER_NAME}} | ||
--subid ${{inputs.AZUREML_TEST_SUBID}} --reponame "recommenders" --branch ${{ steps.extract_branch.outputs.branch }} | ||
--rg ${{inputs.RG}} --wsname ${{inputs.WS}} --expname ${{inputs.EXP_NAME}}_${{inputs.TEST_GROUP}} | ||
--testlogs ${{inputs.TEST_LOGS_PATH}} --add_gpu_dependencies --testkind ${{inputs.TEST_KIND}} | ||
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}} | ||
- name: Submit PySpark tests to AzureML | ||
shell: bash | ||
if: contains(inputs.TEST_GROUP, 'spark') | ||
run: >- | ||
python tests/ci/azureml_tests/submit_groupwise_azureml_pytest.py --clustername ${{inputs.CPU_CLUSTER_NAME}} | ||
--subid ${{inputs.AZUREML_TEST_SUBID}} --reponame "recommenders" --branch ${{ steps.extract_branch.outputs.branch }} | ||
--rg ${{inputs.RG}} --wsname ${{inputs.WS}} --expname ${{inputs.EXP_NAME}}_${{inputs.TEST_GROUP}} | ||
--testlogs ${{inputs.TEST_LOGS_PATH}} --add_spark_dependencies --testkind ${{inputs.TEST_KIND}} | ||
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}} | ||
- name: Print test logs | ||
shell: bash | ||
run: cat ${{inputs.TEST_LOGS_PATH}} | ||
- name: Get exit status | ||
shell: bash | ||
id: exit_status | ||
run: echo ::set-output name=code::$(cat ${{inputs.PYTEST_EXIT_CODE}}) | ||
- name: Check Success/Failure | ||
if: ${{ steps.execute_tests.outputs.code != 0 }} | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('All tests did not pass!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: get-test-groups | ||
description: "Get test group names from tests_groups.py" | ||
inputs: | ||
# type of test - unit or nightly | ||
TEST_KIND: | ||
required: true | ||
type: string | ||
# test environment - cpu, gpu or spark | ||
TEST_ENV: | ||
required: false | ||
type: string | ||
default: 'cpu' | ||
outputs: | ||
test_groups: | ||
value: ${{steps.get_test_groups.outputs.test_groups}} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get test group names | ||
id: get_test_groups | ||
shell: bash | ||
run: | | ||
if [[ ${{ inputs.TEST_KIND }} == "nightly" ]]; then | ||
test_groups_str=$(python -c 'from tests.ci.azureml_tests.test_groups import nightly_test_groups; print([t for t in nightly_test_groups.keys() if "${{inputs.TEST_ENV}}" in t])') | ||
else | ||
test_groups_str=$(python -c 'from tests.ci.azureml_tests.test_groups import unit_test_groups; print(list(unit_test_groups.keys()))') | ||
fi | ||
echo ::set-output name=test_groups::$test_groups_str |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.