Skip to content

Commit

Permalink
Merge pull request #38 from eslerm/travis
Browse files Browse the repository at this point in the history
Travis-CI
  • Loading branch information
mvdbeek committed Sep 21, 2018
2 parents fa0df02 + f606476 commit 9ee412e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
language: python
python: "2.7"
sudo: required

before_install:
- export GALAXY_HOME=/home/galaxy
- export GALAXY_TRAVIS_USER=galaxy
- export GALAXY_UID=1450
- export GALAXY_GID=1450
- sudo groupadd -r $GALAXY_TRAVIS_USER -g $GALAXY_GID
- sudo useradd -u $GALAXY_UID -r -g $GALAXY_TRAVIS_USER -d $GALAXY_HOME -p travis_testing -c "Galaxy user" $GALAXY_TRAVIS_USER
- sudo mkdir $GALAXY_HOME
- sudo chown -R $GALAXY_TRAVIS_USER:$GALAXY_TRAVIS_USER $GALAXY_HOME
- sudo chmod -R 755 $GALAXY_HOME

install:
# Install an upgraded pip and virtualenv
- sudo apt-get install git
- sudo apt-get install python-pip
- pip install virtualenv
- pip install --upgrade pip

# Install Ansible.
- pip install ansible==2.4

# Add ansible.cfg to pick up roles path.
- printf '[defaults]\nroles_path = ../' > ansible.cfg

script:
- ansible-playbook -i "localhost, " -c local tests/test_playbook.yml
2 changes: 1 addition & 1 deletion tasks/clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
include_tasks: virtualenv.yml

- name: Remove orphaned .pyc files and compile bytecode
script: makepyc.py {{ galaxy_server_dir }}/lib
script: "makepyc.py {{ galaxy_server_dir }}/lib"
environment:
PATH: "{{ galaxy_venv_dir }}/bin"
2 changes: 1 addition & 1 deletion tasks/static_setup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Manage static Galaxy configuration files

- name: Create Galaxy config dirs
- name: Create Galaxy config and shed tools directory
file:
path: "{{ item }}"
state: directory
Expand Down
16 changes: 16 additions & 0 deletions tests/test_playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# Travis CI test playbook

- hosts: localhost
gather_facts: False
connection: local
remote_user: travis
vars:
galaxy_commit_id: release_18.05
galaxy_manage_clone: yes
galaxy_manage_download: no
galaxy_server_dir: /home/galaxy/server
galaxy_config_style: yaml
roles:
- role: ansible-galaxy
become: yes

0 comments on commit 9ee412e

Please sign in to comment.