-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add local testing infrastructure (#149)
* initial commit. This will likely need to be updated to work in ci * pull redis host from environment, use requirements file * formatting * downgrade pytest so it still supports python 2.7
- Loading branch information
1 parent
743b7c3
commit 3994c54
Showing
10 changed files
with
68 additions
and
17 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM circleci/python:3.6 | ||
|
||
WORKDIR /src | ||
COPY requirements.txt . | ||
COPY requirements-test.txt . | ||
RUN pip install --user -r requirements.txt -r requirements-test.txt |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: "3.7" | ||
services: | ||
redis: | ||
image: redis:4.0.6 | ||
expose: | ||
- 6379 | ||
tasktiger: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
environment: | ||
REDIS_HOST: redis | ||
volumes: | ||
- .:/src | ||
depends_on: | ||
- redis |
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,3 @@ | ||
freezefrog==0.3.2 | ||
psutil==5.6.3 | ||
pytest==4.6.5 |
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import os | ||
|
||
# How much to delay scheduled tasks for testing purposes. | ||
DELAY = 0.2 | ||
|
||
# Redis database number which will be wiped and used for the tests | ||
TEST_DB = 7 | ||
TEST_DB = int(os.environ.get('REDIS_DB', 7)) | ||
|
||
# Redis hostname | ||
REDIS_HOST = os.environ.get('REDIS_HOST', 'localhost') |
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
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