-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add running tests instructions to README. Add scripts and files to ru…
…n tests in a Docker container.
- Loading branch information
1 parent
538446e
commit d11e714
Showing
6 changed files
with
87 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,12 @@ | ||
# 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 | ||
|
||
WORKDIR /rdflib |
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,8 @@ | ||
tests: | ||
docker compose up test-runner --exit-code-from test-runner | ||
|
||
build: | ||
docker compose build | ||
|
||
coverage: | ||
docker compose up test-runner-coverage --exit-code-from test-runner-coverage |
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,12 @@ | ||
services: | ||
test-runner: | ||
build: . | ||
volumes: | ||
- .:/rdflib | ||
command: ["/rdflib/run_tests.sh"] | ||
|
||
test-runner-coverage: | ||
build: . | ||
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 |