Skip to content

Commit

Permalink
Split tests into two CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
acoburn committed Dec 14, 2018
1 parent 64a5393 commit 0936ee1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 14 deletions.
22 changes: 15 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ python: 3.6
services:
- docker

before_install:
- docker-compose --version
- docker-compose up -d
- docker ps -a
jobs:
include:
- name: "Trellis"
before_install:
- docker-compose --version
- docker-compose -f trellis-compose.yml up -d

- name: "Trellis-ext-db"
before_install:
- docker-compose --version
- docker-compose -f trellis-ext-db-compose.yml up -d

script:
- python verify_running.py
- python setup.py test -a "--baseurl=http://localhost:8080/"
- python setup.py test -a "--baseurl=http://localhost/"
- docker ps -a
- python verify_running.py --baseurl http://localhost/
- python setup.py test -a "--baseurl=http://localhost/"

7 changes: 7 additions & 0 deletions trellis-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3"
services:
trellis:
image: trellisldp/trellis:latest
ports:
- 80:8080

4 changes: 0 additions & 4 deletions docker-compose.yml → trellis-ext-db-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
version: "3"
services:
trellis:
image: trellisldp/trellis:latest
ports:
- 8080:8080
trellis-db:
image: trellisldp/trellis-ext-db:latest
environment:
Expand Down
10 changes: 7 additions & 3 deletions verify_running.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
import argparse
import backoff
import requests

@backoff.on_exception(backoff.expo,
requests.exceptions.RequestException,
Expand All @@ -8,5 +9,8 @@ def get_url(url):
return requests.get(url)

if __name__ == "__main__":
get_url("http://localhost/")
get_url("http://localhost:8080/")
parser = argparse.ArgumentParser(description="Check a webhost")
parser.add_argument("--baseurl", default="http://localhost/")

args = parser.parse_args()
get_url(args.baseurl)

0 comments on commit 0936ee1

Please sign in to comment.