pipelines/components/aws/sagemaker/codebuild/unit-test.buildspec.yml

21 lines
659 B
YAML

version: 0.2
phases:
build:
commands:
- cd components/aws
- docker build . -f ./sagemaker/tests/unit_tests/Dockerfile -t amazon/unit-test-image --quiet
# Run the container and copy the results to /tmp
# Passes all host environment variables through to the container
- docker run --name unit-test-container $(env | cut -f1 -d= | sed 's/^/-e /') amazon/unit-test-image
post_build:
commands:
- docker cp unit-test-container:/app/tests/unit_tests/unit_tests.log /tmp/results.xml
- docker rm -f unit-test-container
reports:
UnitTestReport:
files:
- "results.xml"
base-directory: "/tmp"