Skip to content

[DO NOT REVIEW] [WIP] ODSC-64654 register model artifact reference #1793

[DO NOT REVIEW] [WIP] ODSC-64654 register model artifact reference

[DO NOT REVIEW] [WIP] ODSC-64654 register model artifact reference #1793

name: "[Py3.9-3.11] - All Unit Tests"
on:
workflow_dispatch:
pull_request:
branches: [ "main" ]
paths:
- "ads/**"
- "!ads/opctl/operator/**"
- "!ads/feature_store/**"
- "pyproject.toml"
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
jobs:
test:
name: python ${{ matrix.python-version }}, ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
name: ["unitary", "slow_tests"]
include:
- name: "unitary"
test-path: "tests/unitary"
# `model` tests running in "slow_tests",
# `feature_store` tests has its own test suite
# `forecast` tests not supported in python 3.9,3.10 (automlx dependency). Tests are running in python3.8 test env, see run-unittests-py38-cov-report.yml
# 'pii' tests run only with py3.8, 'datapane' library conflicts with pandas>2.2.0, which used in py3.9/3.10 setup
# 'hpo' tests hangs if run together with all unitary tests. Tests running in separate command before running all unitary
ignore-path: |
--ignore tests/unitary/with_extras/model \
--ignore tests/unitary/with_extras/feature_store \
--ignore tests/unitary/with_extras/operator/feature-store \
--ignore tests/unitary/with_extras/operator/forecast \
--ignore tests/unitary/with_extras/operator/pii \
--ignore tests/unitary/with_extras/hpo
- name: "slow_tests"
test-path: "tests/unitary/with_extras/model"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/create-more-space
name: "Create more disk space"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
pyproject.toml
"**requirements.txt"
- uses: ./.github/workflows/set-dummy-conf
name: "Test config setup"
- uses: ./.github/workflows/test-env-setup
name: "Test env setup"
timeout-minutes: 30
- name: "Run hpo tests"
timeout-minutes: 10
shell: bash
if: ${{ matrix.name }} == "unitary"
run: |
set -x # print commands that are executed
# Run hpo tests, which hangs if run together with all unitary tests
python -m pytest -v -p no:warnings -n auto --dist loadfile \
tests/unitary/with_extras/hpo
- name: "Run unitary tests folder with maximum ADS dependencies"
timeout-minutes: 60
shell: bash
env:
CONDA_PREFIX: /usr/share/miniconda
run: |
set -x # print commands that are executed
# Run tests
python -m pytest -v -p no:warnings --durations=5 \
-n auto --dist loadfile \
${{ matrix.test-path }} ${{ matrix.ignore-path }}