<commit_before>sudo: required

language: python
python: 2.7

services:
  - docker

env:
  - TOX_ENV=py27
  - COMPOSE=True

git:
  submodules: false

before_install:
  - export GALAXY_HOME=/home/galaxy
  - export GALAXY_USER=<EMAIL>
  - export GALAXY_USER_EMAIL=<EMAIL>
  - export GALAXY_USER_PASSWD=<PASSWORD>
  - export BIOBLEND_GALAXY_API_KEY=admin
  - export BIOBLEND_GALAXY_URL=http://localhost:8080

  - sudo apt-get update -qq
  - sudo apt-get install docker-engine --no-install-recommends -y -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew"

  - docker --version
  - docker info

  - git submodule update --init --recursive
  - docker build -t quay.io/bgruening/galaxy galaxy/
  - sudo chown 1450 /tmp && sudo chmod a=rwx /tmp

  - |
    if [ "${COMPOSE}" ]
    then
        pip install docker-compose
        cd compose
        docker build -t quay.io/galaxy/proftpd ./proftpd
        docker tag quay.io/galaxy/proftpd quay.io/galaxy/proftpd:compose
        docker tag quay.io/bgruening/galaxy quay.io/bgruening/galaxy:compose
        docker-compose up
    else
        docker run -d -p 7080:80 -p 7021:21 \
            --name galaxy_test_container \
            --privileged=true \
            -e GALAXY_CONFIG_ALLOW_USER_DATASET_PURGE=True \
            -e GALAXY_CONFIG_ALLOW_LIBRARY_PATH_PASTE=True \
            -e GALAXY_CONFIG_ENABLE_USER_DELETION=True \
            -e GALAXY_CONFIG_ENABLE_BETA_WORKFLOW_MODULES=True \
            -v /tmp/:/tmp/ \
            quay.io/bgruening/galaxy
    fi
  - docker ps

script:
  # Test submitting jobs to an external slurm cluster
  - cd $TRAVIS_BUILD_DIR/test/slurm/ && bash test.sh && cd $TRAVIS_BUILD_DIR
  - curl --fail $BIOBLEND_GALAXY_URL/api/version
  - time > time.txt && curl --fail -T time.txt ftp://localhost:8021 --user $GALAXY_USER:$GALAXY_USER_PASSWD
  - curl --fail ftp://localhost:8021 --user $GALAXY_USER:$GALAXY_USER_PASSWD
  - cd $TRAVIS_BUILD_DIR/test/bioblend/ && bash test.sh && cd $TRAVIS_BUILD_DIR/
  # Test the 'old' tool installation script
  - docker run quay.io/bgruening/galaxy bash -c 'install-repository "--url https://toolshed.g2.bx.psu.edu -o iuc --name bedtools --panel-section-name 'BEDTools'"'
  # Test the 'new' tool installation script
  - docker run quay.io/bgruening/galaxy bash -c "install-tools $GALAXY_HOME/ansible/galaxy-tools-playbook/files/sample_tool_list.yaml"
  # Test Docker in Docker, used by Interactive Environments; This needs to be at the end as Docker takes some time to start.
  - docker exec -i -t galaxy_test_container docker info
  - docker stop galaxy_test_container<commit_msg>detached mode for compose testing<commit_after>sudo: required

language: python
python: 2.7

services:
  - docker

env:
  - TOX_ENV=py27
  - COMPOSE=True

git:
  submodules: false

before_install:
  - export GALAXY_HOME=/home/galaxy
  - export GALAXY_USER=<EMAIL>
  - export GALAXY_USER_EMAIL=<EMAIL>
  - export GALAXY_USER_PASSWD=<PASSWORD>
  - export BIOBLEND_GALAXY_API_KEY=admin
  - export BIOBLEND_GALAXY_URL=http://localhost:8080

  - sudo apt-get update -qq
  - sudo apt-get install docker-engine --no-install-recommends -y -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew"

  - docker --version
  - docker info

  - git submodule update --init --recursive
  - docker build -t quay.io/bgruening/galaxy galaxy/
  - sudo chown 1450 /tmp && sudo chmod a=rwx /tmp

  - |
    if [ "${COMPOSE}" ]
    then
        pip install docker-compose
        cd compose
        docker build -t quay.io/galaxy/proftpd ./proftpd
        docker tag quay.io/galaxy/proftpd quay.io/galaxy/proftpd:compose
        docker tag quay.io/bgruening/galaxy quay.io/bgruening/galaxy:compose
        docker-compose up -d
    else
        docker run -d -p 7080:80 -p 7021:21 \
            --name galaxy_test_container \
            --privileged=true \
            -e GALAXY_CONFIG_ALLOW_USER_DATASET_PURGE=True \
            -e GALAXY_CONFIG_ALLOW_LIBRARY_PATH_PASTE=True \
            -e GALAXY_CONFIG_ENABLE_USER_DELETION=True \
            -e GALAXY_CONFIG_ENABLE_BETA_WORKFLOW_MODULES=True \
            -v /tmp/:/tmp/ \
            quay.io/bgruening/galaxy
    fi
  - sleep 10
  - docker ps

script:
  # Test submitting jobs to an external slurm cluster
  - cd $TRAVIS_BUILD_DIR/test/slurm/ && bash test.sh && cd $TRAVIS_BUILD_DIR
  - curl --fail $BIOBLEND_GALAXY_URL/api/version
  - time > time.txt && curl --fail -T time.txt ftp://localhost:8021 --user $GALAXY_USER:$GALAXY_USER_PASSWD
  - curl --fail ftp://localhost:8021 --user $GALAXY_USER:$GALAXY_USER_PASSWD
  - cd $TRAVIS_BUILD_DIR/test/bioblend/ && bash test.sh && cd $TRAVIS_BUILD_DIR/
  # Test the 'old' tool installation script
  - docker run quay.io/bgruening/galaxy bash -c 'install-repository "--url https://toolshed.g2.bx.psu.edu -o iuc --name bedtools --panel-section-name 'BEDTools'"'
  # Test the 'new' tool installation script
  - docker run quay.io/bgruening/galaxy bash -c "install-tools $GALAXY_HOME/ansible/galaxy-tools-playbook/files/sample_tool_list.yaml"
  # Test Docker in Docker, used by Interactive Environments; This needs to be at the end as Docker takes some time to start.
  - docker exec -i -t galaxy_test_container docker info
  - docker stop galaxy_test_container
{'fraction_non_alphanumeric': 0.10957367240089753, 'fraction_numerical': 0.012715033657442034, 'mean_word_length': 2.8845315904139435, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3650006', 'n_tokens_mistral': 2072, 'n_tokens_neox': 1924, 'n_words': 438}