-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from twistmcflip/jaredonline/test-suite-start
Create a test harness
- Loading branch information
Showing
18 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
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,10 @@ | ||
# This marks the "test" target as 'phony', which means that it isn't based on actual | ||
# files. Make has a ton of magic in it, and one of the bits of magic is it won't | ||
# rebuild a target if it doesn't think any of its dependencies have changed. Phony | ||
# means its not based on on-disk targets, so always build it when invoked | ||
.PHONY: test | ||
|
||
# The test target makes sure all docker images are up to date and runs the test | ||
# suite | ||
test: | ||
docker-compose down && docker-compose build test && docker-compose run test && docker-compose down |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
# The full docker-compose spec is available here: https://docs.docker.com/compose/compose-file/#reference-and-guidelines | ||
version: '3' | ||
|
||
# docker-compose allows you to bundle a bunch of docker concepts together into | ||
# a unit that all needs to be run at this same time. This could be many containers, | ||
# volumes, or the networking between them all. | ||
services: | ||
|
||
# our test service is the image built specifically to run our test environment, | ||
# and if we ever get CI/CD setup it will be what we run | ||
test: | ||
build: | ||
context: . | ||
dockerfile: docker/test/Dockerfile | ||
|
||
# we unfortunately can't invode "pytest" directly due to some weirdness with | ||
# how Ananaconda sets up environments, so we use a wrapper script. This is | ||
# run inside the docker container when it boots up | ||
command: "./test.sh" |
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,24 @@ | ||
# This is the official Ananaconda Dockerfile maintained by ContinuumIO. At some point | ||
# we will probably want to peg this to a specific version that TSTools supports | ||
FROM continuumio/anaconda3 | ||
|
||
# Create a directory for our code | ||
RUN mkdir -p /tstools | ||
|
||
# Copy in the Library code | ||
COPY ./python/src /tstools/src | ||
|
||
# Copy in the test code | ||
COPY ./python/tests /tstools/tests | ||
|
||
# Tell Docker that we want to do the rest of our work from this directory | ||
WORKDIR /tstools | ||
|
||
# Copy in our test harness | ||
COPY ./shell/python-tests.sh ./test.sh | ||
|
||
# Make our test runner executable in the Docker container (not the local one) | ||
RUN chmod +x ./test.sh | ||
|
||
# Set Bash as our entry | ||
ENTRYPOINT [ "/bin/bash" ] |
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 @@ | ||
__version__ = '0.0.1' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
__version__ = '0.0.0' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,7 @@ | ||
import sys | ||
sys.path.append("./src") | ||
|
||
import timeSeries as ts | ||
|
||
def test_readUnrTxyz2(): | ||
assert True == True |
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 @@ | ||
# initialize Anaconda | ||
. /opt/conda/bin/activate | ||
|
||
# Run our test suite | ||
pytest |