Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/container-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ jobs:
- name: Test Container Group
uses: intel/ai-containers/test-runner@main
with:
cache_registry: ${{ secrets.CACHE_REGISTRY }}
mlops_repo: ${{ secrets.MLOPS_REPO || github.repository }}
mlops_ref: ${{ secrets.MLOPS_REF || github.ref }}
recipe_dir: ${{ inputs.group_dir }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-runner-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
- name: Test Container Group
uses: intel/ai-containers/test-runner@main
with:
cache_registry: ${{ secrets.CACHE_REGISTRY }}
mlops_repo: ${{ github.repository }}
mlops_ref: ${{ github.ref }}
recipe_dir: test-runner
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Define your project's registry and repository each time you use the project:

```bash
# REGISTRY/REPO:TAG
export CACHE_REGISTRY=<cache_registry_name>
export REGISTRY=<registry_name>
export REPO=<repo_name>
```
Expand Down
5 changes: 5 additions & 0 deletions test-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ name: Integration Test
description: 'https://github.com/intel/ai-containers/blob/main/test-runner/README.md'
author: tyler.titsworth@intel.com
inputs:
cache_registry:
description: 'Container Cache Registry URL'
required: true
type: string
mlops_repo:
description: 'Test Runner org/repo'
required: true
Expand Down Expand Up @@ -63,6 +67,7 @@ runs:
shell: bash
run: venv/bin/python mlops/test-runner/test_runner.py -f ${{ inputs.test_dir }}/tests.yaml -l ${{ inputs.test_dir }}/logs -a ${{ inputs.recipe_dir }}/.actions.json -v
env:
CACHE_REGISTRY: ${{ inputs.cache_registry }}
PYTHONPATH: mlops/test-runner
REGISTRY: ${{ inputs.registry }}
REPO: ${{ inputs.repo }}
Expand Down
6 changes: 3 additions & 3 deletions test-runner/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ test2:
env:
TEST: Hello
test3:
img: python:3.10-slim-bullseye # python 3.10
img: ${CACHE_REGISTRY}/cache/library/python:3.10-slim-bullseye # python 3.10
cmd: python --version # will return python 3.11
serving: True
test${TEST:-4}:
img: python:3.11-slim-bullseye
img: ${CACHE_REGISTRY}/cache/library/python:3.11-slim-bullseye
cmd: echo "${TEST:-4}"
test6:
img: python:3.11-slim-bullseye
img: ${CACHE_REGISTRY}/cache/library/python:3.11-slim-bullseye
cmd: "echo 'hello: world'"
mask:
- hello
Expand Down
9 changes: 5 additions & 4 deletions test-runner/tests/utest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import pytest
import yaml
from expandvars import expandvars
from hypothesis import given
from hypothesis.strategies import dictionaries, text
from test_runner import get_test_list, parse_args, set_log_filename
Expand Down Expand Up @@ -124,20 +125,20 @@ def test_get_test_list(test_args_input, test_json_input):
"env": {"TEST": "Hello"},
},
"test3": {
"img": "python:3.10-slim-bullseye",
"img": "${CACHE_REGISTRY}/cache/library/python:3.10-slim-bullseye",
"cmd": "python --version",
"serving": True,
},
"test4": {
"img": "python:3.11-slim-bullseye",
"img": f"{expandvars('${CACHE_REGISTRY}')}/cache/library/python:3.11-slim-bullseye",
"cmd": 'echo "4"',
},
"test5": {
"img": "python:3.11-slim-bullseye",
"img": f"{expandvars('${CACHE_REGISTRY}')}/cache/library/python:3.11-slim-bullseye",
"cmd": 'echo "5"',
},
"test6": {
"img": "python:3.11-slim-bullseye",
"img": "${CACHE_REGISTRY}/cache/library/python:3.11-slim-bullseye",
"cmd": "echo 'hello: world'",
"mask": ["hello"],
},
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ commands =
pythonpath = tests
passenv = DOCKER_*
setenv =
CACHE_REGISTRY = {env:CACHE_REGISTRY}
PATH = {env:PATH}:/usr/local/bin/docker
PWD = {env:PWD}
REGISTRY = {env:REGISTRY}
Expand Down