forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker test runner (home-assistant#2673)
* Add docker test runner * Move test Dockerfile into virtualization folder * Don't build zwave in test environment
- Loading branch information
Showing
5 changed files
with
46 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.tox | ||
.git |
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 |
---|---|---|
|
@@ -52,7 +52,8 @@ develop-eggs | |
lib | ||
lib64 | ||
|
||
# Installer logs | ||
# Logs | ||
*.log | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
docker build -t home-assistant-test -f virtualization/Docker/Dockerfile.test . | ||
docker run --rm -it home-assistant-test tox -e lint |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
docker build -t home-assistant-test -f virtualization/Docker/Dockerfile.test . | ||
docker run --rm -it home-assistant-test tox -e py34 |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM python:3.4 | ||
MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> | ||
|
||
VOLUME /config | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN pip3 install --no-cache-dir colorlog cython | ||
|
||
# For the nmap tracker, bluetooth tracker, Z-Wave | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends nmap net-tools cython3 libudev-dev sudo libglib2.0-dev locales-all && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN pip3 install --no-cache-dir tox | ||
|
||
# Copy over everything required to run tox | ||
COPY requirements_all.txt requirements_all.txt | ||
COPY requirements_test.txt requirements_test.txt | ||
COPY setup.cfg setup.cfg | ||
COPY setup.py setup.py | ||
COPY tox.ini tox.ini | ||
COPY homeassistant/const.py homeassistant/const.py | ||
|
||
# Get deps | ||
RUN tox --notest | ||
|
||
# Copy source and run tests | ||
COPY . . | ||
|
||
CMD [ "tox" ] |