-
Notifications
You must be signed in to change notification settings - Fork 560
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 #1352 from RDFLib/feat/tests-improve
Improve running tests locally
- Loading branch information
Showing
6 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tests: | ||
docker-compose -f docker-compose.tests.yml up test-runner | ||
docker-compose -f docker-compose.tests.yml down | ||
|
||
build: | ||
docker-compose -f docker-compose.tests.yml build | ||
|
||
coverage: | ||
docker-compose -f docker-compose.tests.yml up test-runner-coverage | ||
docker-compose -f docker-compose.tests.yml down |
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 @@ | ||
services: | ||
test-runner: | ||
build: | ||
context: . | ||
dockerfile: test/Dockerfile | ||
volumes: | ||
- .:/rdflib | ||
command: ["/rdflib/run_tests.sh"] | ||
|
||
test-runner-coverage: | ||
build: | ||
context: . | ||
dockerfile: test/Dockerfile | ||
volumes: | ||
- .:/rdflib | ||
command: ["/rdflib/run_tests_with_coverage_report.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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd /rdflib | ||
pip install -e . | ||
|
||
test_command="nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=rdflib" | ||
echo "Running tests..." | ||
echo "Test command: $test_command" | ||
$test_command |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd /rdflib | ||
pip install -e . | ||
|
||
test_command="nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=rdflib --cover-html" | ||
echo "Running tests..." | ||
echo "Test command: $test_command" | ||
$test_command |
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,14 @@ | ||
# Docker image for the rdflib test-runner. | ||
|
||
# Use the lowest supported Python version to run tests. | ||
FROM python:3.6 | ||
|
||
COPY requirements.dev.txt . | ||
COPY requirements.txt . | ||
|
||
RUN pip install --no-cache -r requirements.dev.txt | ||
RUN pip install --no-cache -r requirements.txt | ||
|
||
RUN mkdir -p /rdflib | ||
VOLUME /rdflib | ||
WORKDIR /rdflib |