Vlad Dracula 7 years ago
parent
commit
5101ec7211
4 changed files with 27 additions and 0 deletions
  1. 13 0
      .travis.yml
  2. 14 0
      README.md
  3. 0 0
      test/phpunit.xml
  4. 0 0
      test/tripal_test.test

+ 13 - 0
.travis.yml

@@ -0,0 +1,13 @@
+language: php
+
+services:
+  - docker
+
+sudo: required
+
+
+script:
+  - git clone https://github.com/tripal/docker-tripal-centos
+  - cd tripal-v2 && docker build .  #Aftewards run the container and do stuff with it  - docker run -it -p 8080:80 mingchen0919/docker-tripal-v2 /bin/bash
+  - cd ../tripal-v3 && docker build .
+  - ls #we'll run tests at this step  # docker exec -it tripal-v3 bash -c 'cd /var/www/html/sites/all/modules/tripal/ &&composer install && ./vendor/bin/phpunit'

+ 14 - 0
README.md

@@ -111,3 +111,17 @@ precise customizations as required by the community. A well-developed
 Tripal API provides a uniform set of variables and functions for 
 accessing any and all data within the Chado database. See the Tripal 3.x
 Developer's Handbook for additional details.
+
+
+# Development Testing
+
+The Travis build will test creation of a new Tripal 2 and Tripal 3 docker, pull the latest master branch, and run the updatedb.
+
+Once this completes, it will run unit tests.
+
+To run unit tests on your local system, simply create a `.env` file in your `/Tests/` directory that defines the `DRUPAL_ROOT` variable, for example 
+
+```
+DRUPAL_ROOT=/var/www/html
+```
+Then run PHPUnit from your root directory.

+ 0 - 0
test/phpunit.xml


+ 0 - 0
test/tripal_test.test