-
Notifications
You must be signed in to change notification settings - Fork 3k
/
action.yml
34 lines (32 loc) · 1.14 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ---------------------------------------------------------
# Copyright (c) Recommenders contributors.
# Licensed under the MIT License.
# ---------------------------------------------------------
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 pr_gate_test_groups; print(list(pr_gate_test_groups.keys()))')
fi
echo "test_groups=$test_groups_str" >> $GITHUB_OUTPUT