-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'f/testcontainers' into 'main'
Improve testing speed with test containers See merge request es/ai/hannah/hannah!401
- Loading branch information
Showing
5 changed files
with
460 additions
and
462 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
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 |
---|---|---|
|
@@ -27,39 +27,16 @@ variables: | |
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" | ||
POETRY_HOME: "$CI_PROJECT_DIR/.poetry" | ||
POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pypoetry" | ||
POETRY_VIRTUALENVS_CREATE: false | ||
GIT_SUBMODULE_STRATEGY: recursive | ||
DEBIAN_FRONTEND: "noninteractive" | ||
|
||
cache: | ||
key: "$CI_JOB_NAME" | ||
|
||
before_script: | ||
- apt update | ||
- apt -y install git mesa-utils python3-dev libblas-dev liblapack-dev libsndfile1-dev libsox-dev cmake ninja-build curl build-essential python-is-python3 | ||
|
||
|
||
# Install poetry using recommended method | ||
- curl -sSL https://install.python-poetry.org/ | python3 | ||
- export PATH=${POETRY_HOME}/bin:${PATH} | ||
|
||
# install and manage dependencies with poetry | ||
- poetry config installer.max-workers 10 | ||
- poetry install --all-extras | ||
|
||
# Show limits | ||
- ulimit -a | ||
|
||
test_prebuilt_docker: | ||
stage: test | ||
image: cgerum/hannah:latest | ||
before_script: | ||
- export POETRY_HOME=/root/.local | ||
- export PATH=${POETRY_HOME}/bin:${PATH} | ||
- poetry config installer.max-workers 10 | ||
- poetry install -E vision | ||
- ulimit -a | ||
image: ghcr.io/ekut-es/hannah_hannah:latest | ||
script: | ||
- set -e | ||
- poetry install -E vision | ||
- poetry run python3 -m pytest -v --cov=hannah test hannah | ||
tags: | ||
- docker | ||
|
@@ -68,48 +45,28 @@ test_prebuilt_docker: | |
- merge_requests | ||
dependencies: [] | ||
|
||
|
||
test_python_39: | ||
stage: test | ||
image: python:3.9 | ||
image: ghcr.io/ekut-es/hannah_python_3.9:latest | ||
script: | ||
- set -e | ||
- poetry config installer.max-workers 10 | ||
- poetry install -E vision | ||
- poetry run python3 -m pytest -v --cov=hannah test hannah --integration | ||
tags: | ||
- docker | ||
interruptible: true | ||
dependencies: [] | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
dependencies: [] | ||
cache: | ||
paths: | ||
- .cache/ | ||
|
||
#test_tvm: | ||
# stage: test | ||
# image: ubuntu:22.04 | ||
# script: | ||
# - set -e | ||
# - apt-get install -y llvm-dev libclang-dev g++ python-is-python3 | ||
# - poetry config installer.max-workers 10 | ||
# - poetry run external/hannah-tvm/scripts/install_full.sh | ||
# - poetry install -E tvm -E vision | ||
# - poetry run python -m pytest -v --cov=hannah --cov external/hannah-tvm test --integration | ||
# tags: | ||
# - docker | ||
# interruptible: true | ||
# allow_failure: false | ||
# rules: | ||
# - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
# cache: | ||
# paths: | ||
# - .cache/ | ||
|
||
test_python_310: | ||
stage: test | ||
image: python:3.10 | ||
image: ghcr.io/ekut-es/hannah_python_3.10:latest | ||
script: | ||
- set -e | ||
- poetry config installer.max-workers 10 | ||
- poetry install -E vision | ||
- "echo 'import coverage; coverage.process_startup()' > sitecustomize.py" | ||
- export PYTHONPATH=$PWD | ||
- export COVERAGE_PROCESS_START=$PWD/.coveragerc | ||
|
@@ -127,17 +84,16 @@ test_python_310: | |
coverage_format: cobertura | ||
path: coverage.xml | ||
dependencies: [] | ||
cache: | ||
paths: | ||
- .cache/ | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
|
||
test_python_311: | ||
stage: test | ||
image: python:3.11 | ||
image: ghcr.io/ekut-es/hannah_python_3.11:latest | ||
script: | ||
- set -e | ||
- poetry config installer.max-workers 10 | ||
- poetry install -E vision | ||
- "echo 'import coverage; coverage.process_startup()' > sitecustomize.py" | ||
- export PYTHONPATH=$PWD | ||
- export COVERAGE_PROCESS_START=$PWD/.coveragerc | ||
|
@@ -155,16 +111,12 @@ test_python_311: | |
coverage_format: cobertura | ||
path: coverage.xml | ||
dependencies: [] | ||
cache: | ||
paths: | ||
- .cache/ | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
|
||
|
||
build_docs: | ||
stage: test | ||
image: ubuntu:22.04 | ||
image: ubuntu:20.04 | ||
variables: | ||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" | ||
cache: | ||
|
@@ -206,27 +158,6 @@ run_sca: | |
interruptible: true | ||
allow_failure: true | ||
|
||
#ml_cloud_integration: | ||
# stage: build | ||
# image: ubuntu:latest | ||
# dependencies: [] | ||
# before_script: | ||
# - apt update | ||
# - apt -y install openssh-client | ||
# - eval $(ssh-agent -s) | ||
# - mkdir -p ~/.ssh | ||
# - echo "$ML_CLOUD_KEY" > ~/.ssh/ml_cloud.key | ||
# - chmod -R 0600 ~/.ssh | ||
# - ssh-add ~/.ssh/ml_cloud.key | ||
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' | ||
# script: | ||
# - set -e | ||
# - scp scripts/ml_cloud_ci.sh [email protected]:/home/bringmann/cgerum05/ci/ml_cloud_ci.sh | ||
# - ssh [email protected] /home/bringmann/cgerum05/ci/ml_cloud_ci.sh | ||
# rules: | ||
# - if: $CI_PIPELINE_SOURCE == "schedule" | ||
|
||
|
||
deploy to github: | ||
stage: build | ||
image: ubuntu:latest | ||
|
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.