-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make user for docker image configurable Upgrade test dependencies Add .travis.yml and basic FreeCAD integration sanity test
- Loading branch information
Showing
5 changed files
with
46 additions
and
8 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 @@ | ||
language: python | ||
python: | ||
- '3.6' | ||
services: | ||
- docker | ||
install: | ||
- docker build -t ose-workbench-platform --build-arg USER=$USER --build-arg UID=$(id -u) --build-arg GID=$(id -g) ./osewb | ||
- docker run --name osewb --detach --volume $(pwd):/var/app ose-workbench-platform | ||
script: | ||
- docker exec -it osewb pytest --cov osewb/ test/ | ||
after_success: | ||
- docker exec -e TRAVIS="$TRAVIS" -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" -e TRAVIS_PULL_REQUEST="$TRAVIS_PULL_REQUEST" osewb coveralls |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
coverage==5.0.3 | ||
coveralls==1.10.0 | ||
pytest==4.6.9 | ||
pytest-cov==2.8.1 | ||
coverage==5.1 | ||
coveralls==2.0.0 | ||
pytest==5.4.3 | ||
pytest-cov==2.9.0 |
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,22 @@ | ||
import unittest | ||
|
||
# Need to import FreeCAD | ||
import FreeCAD as App | ||
import Part | ||
|
||
|
||
class FreeCADTest(unittest.TestCase): | ||
""" | ||
Sanity test for FreeCAD integration. | ||
""" | ||
|
||
def test_freecad(self): | ||
box = Part.makeBox(10, 10, 10) | ||
self.assertEqual(len(box.Faces), 6) | ||
self.assertAlmostEqual(box.Volume, 1000) | ||
self.assertAlmostEqual(box.Area, 600) | ||
self.assertEqual(box.TypeId, 'Part::TopoShape') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |