forked from DataDog/datadog-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·27 lines (23 loc) · 909 Bytes
/
run_tests.sh
File metadata and controls
executable file
·27 lines (23 loc) · 909 Bytes
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
#!/bin/bash
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019 Datadog, Inc.
# Run unit tests in Docker
set -e
PYTHON_VERSIONS=("2.7" "3.6" "3.7" "3.8")
for python_version in "${PYTHON_VERSIONS[@]}"
do
echo "Running tests against python${python_version}"
docker build -t datadog-lambda-python-test:$python_version \
-f tests/Dockerfile . \
--build-arg python_version=$python_version
docker run -v `pwd`:/datadog-lambda-python \
-w /datadog-lambda-python \
datadog-lambda-python-test:$python_version \
nose2 -v
docker run -v `pwd`:/datadog-lambda-python \
-w /datadog-lambda-python \
datadog-lambda-python-test:$python_version \
flake8 datadog_lambda/
done