travis CLI fix attempt

pull/97/head
Agam 2020-09-02 15:50:43 -04:00
parent 6f9eaee675
commit dd8705b114
1 changed files with 87 additions and 89 deletions

View File

@ -1,102 +1,100 @@
services: services:
- mysql - mysql
- docker - docker
sudo: required sudo: required
language: python
language: python # this works for Linux but is an error on macOS or Windows
jobs: jobs:
include: include:
- stage: "Tests" - stage: Tests
name: "Python 3.7 on Xenial Linux" name: Python 3.7 on Xenial Linux
os: linux os: linux
language: python language: python
python: 3.7 python: 3.7
before_install: before_install:
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH - export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
- source ~/.bashrc - source ~/.bashrc
- sudo apt-get install linuxbrew-wrapper - sudo apt-get install linuxbrew-wrapper
- brew tap --shallow linuxbrew/xorg - brew tap --shallow linuxbrew/xorg
- brew install r - brew install r
- R --version - R --version
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O
- bash miniconda.sh -b -p $HOME/miniconda miniconda.sh;
- source "$HOME/miniconda/etc/profile.d/conda.sh" - bash miniconda.sh -b -p $HOME/miniconda
- hash -r - source "$HOME/miniconda/etc/profile.d/conda.sh"
- conda config --set always_yes yes --set changeps1 no - hash -r
install: - conda config --set always_yes yes --set changeps1 no
- conda init bash install:
- conda update -q --all --yes conda - conda init bash
- conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file environment.yml - conda update -q --all --yes conda
- conda activate test-environment - conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file
- snakemake -j1 renv_install environment.yml
- R -e 'renv::settings$use.cache(FALSE)' - conda activate test-environment
- snakemake -j1 renv_restore - snakemake -j1 renv_install
cache: - R -e 'renv::settings$use.cache(FALSE)'
directories: - snakemake -j1 renv_restore
- /home/travis/.linuxbrew cache:
- $HOME/.local/share/renv directories:
- $TRAVIS_BUILD_DIR/renv/library - "/home/travis/.linuxbrew"
script: - "$HOME/.local/share/renv"
- bash tests/scripts/run_tests.sh - "$TRAVIS_BUILD_DIR/renv/library"
script:
- name: "Python 3.7 on macOS" - bash tests/scripts/run_tests.sh
os: osx - name: Python 3.7 on macOS
osx_image: xcode11.3 # Python 3.7 running on macOS 10.14.4 os: osx
language: generic # 'language: python' is an error on Travis CI macOS osx_image: xcode11.3
before_install: language: generic
- HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc@9 before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/Homebrew/homebrew-core/raw/218998d/Formula/r.rb # R 4.0.0 - HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc@9
- R --version - HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/Homebrew/homebrew-core/raw/218998d/Formula/r.rb
- HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql - R --version
- HOMEBREW_NO_AUTO_UPDATE=1 brew services start mysql - HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql
- HOMEBREW_NO_AUTO_UPDATE=1 brew cask install miniconda - HOMEBREW_NO_AUTO_UPDATE=1 brew services start mysql
- eval "$(/opt/miniconda3/condabin/conda shell.bash hook)" - HOMEBREW_NO_AUTO_UPDATE=1 brew cask install miniconda
- eval "$(conda shell.bash hook)" # properly initialise non-interactive shell with gcc and no update brew - eval "$(/opt/miniconda3/condabin/conda shell.bash hook)"
install: - eval "$(conda shell.bash hook)"
- conda init bash install:
- conda update -q --all --yes conda - conda init bash
- conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file environment.yml - conda update -q --all --yes conda
- conda activate test-environment - conda env create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file
- snakemake -j1 renv_install environment.yml
- R -e 'renv::settings$use.cache(FALSE)' - conda activate test-environment
- snakemake -j1 renv_restore - snakemake -j1 renv_install
env: - R -e 'renv::settings$use.cache(FALSE)'
- RENV_PATHS_ROOT="$HOME/renv/cache" - snakemake -j1 renv_restore
cache: env:
directories: - RENV_PATHS_ROOT="$HOME/renv/cache"
- /usr/local/lib/R cache:
- $RENV_PATHS_ROOT directories:
- $TRAVIS_BUILD_DIR/renv/library - "/usr/local/lib/R"
script: - "$RENV_PATHS_ROOT"
- bash tests/scripts/run_tests.sh - "$TRAVIS_BUILD_DIR/renv/library"
script:
- stage: deploy - bash tests/scripts/run_tests.sh
name: "Python 3.7 on Xenial Linux Docker" - stage: deploy
env: name: Python 3.7 on Xenial Linux Docker
- secure: Xq5Gq6PniOqSgU6BTycBBNd1UrsKru/aEuTds+9WGP8zwEsfjqzs/bKXpkLSWXWqdNYNlkT0FqHOcmB1K/z62DvstsFpjnsYAfQiW8fN6jKM22JUbLjwY2AJHRuNx9IyGcRMndsr/HrnyEKPCND7+abUWYxGc1GwErL4+MCLDY7JUKUtVGMoArqWNTYOu95YJX7r+XTEmq3Hlw5DV7/BZMoyHwHMhsg2ERGRVQi7tPnGdRXE7rQWcwV+99e9JS+DVOuiu3KInyvculHjsdT9YnLHku65pELINnPefNHIn59rdfb+sBj455RzYxPPFgAbt0lXndaJ/LU60+gPL3H14g/CA9Qak9qVt/QlUh8YjmUcsq4ExRlYfOWLOiXPYgaduGDRwYxmUKJUDSIPdAgP8Dcgm4X2HgImyIziMplgjjl5zUkD9AQkYpoFVxL4L8RXgXgVb6Iis81AUBjxq3KSba8lk1GPGM7GNRzkvbDyqqt7SXmKlmOtCapDNNAyzrlx+l6FqtJJm9dIFULJqy8l7LcoGz5D4kbvlKNgGf9UoWI58cHiURFlMGC8NwKKjfm/TVJYKmO7Lb6SZ/lJHQ7tctePn15r8AVVgo/xM7r0QH8yPp4jmgBVJ6NV0PaCFnftXBewInWHbHpu0CsVTY/wFLfIUc4FxmR/CBXmmjpROx4= env:
os: linux - secure: Xq5Gq6PniOqSgU6BTycBBNd1UrsKru/aEuTds+9WGP8zwEsfjqzs/bKXpkLSWXWqdNYNlkT0FqHOcmB1K/z62DvstsFpjnsYAfQiW8fN6jKM22JUbLjwY2AJHRuNx9IyGcRMndsr/HrnyEKPCND7+abUWYxGc1GwErL4+MCLDY7JUKUtVGMoArqWNTYOu95YJX7r+XTEmq3Hlw5DV7/BZMoyHwHMhsg2ERGRVQi7tPnGdRXE7rQWcwV+99e9JS+DVOuiu3KInyvculHjsdT9YnLHku65pELINnPefNHIn59rdfb+sBj455RzYxPPFgAbt0lXndaJ/LU60+gPL3H14g/CA9Qak9qVt/QlUh8YjmUcsq4ExRlYfOWLOiXPYgaduGDRwYxmUKJUDSIPdAgP8Dcgm4X2HgImyIziMplgjjl5zUkD9AQkYpoFVxL4L8RXgXgVb6Iis81AUBjxq3KSba8lk1GPGM7GNRzkvbDyqqt7SXmKlmOtCapDNNAyzrlx+l6FqtJJm9dIFULJqy8l7LcoGz5D4kbvlKNgGf9UoWI58cHiURFlMGC8NwKKjfm/TVJYKmO7Lb6SZ/lJHQ7tctePn15r8AVVgo/xM7r0QH8yPp4jmgBVJ6NV0PaCFnftXBewInWHbHpu0CsVTY/wFLfIUc4FxmR/CBXmmjpROx4=
language: python os: linux
script: language: python
- docker build -t rapids . script:
- docker login -u "agamk" -p $DOCKERPWD - docker build -t rapids .
- docker tag rapids agamk/rapids:travislatest - docker login -u "agamk" -p $DOCKERPWD
- docker push agamk/rapids:travislatest - docker tag rapids agamk/rapids:travislatest
- docker push agamk/rapids:travislatest
branches: branches:
only: only:
- master - master
notifications: notifications:
email: false email: false
slack: slack:
# if: branch = travis_test
secure: cJIpmIjb3zA5AMDBo9axF1v6fYNIgMm6s6UdMNOlHiT511xHGsaLUFej3lACwQLig4Gr94ySI61YdrP+RX1lFcYxusH+kUU/c8LX0PmSKNeKnycM3w/pCM+yTp/6oQG6ZrJD7pNm6zhB0xPL61uSmYhcr+JJ1sh4iLiON+J8/C+IfnAHm1ORkxJ0IxASkiP/Lva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K4VHMloJ6s0kuyko7LT5EMQf3pBJij5TnYmD2E60t+bSBAxHuH7WA5dvL+igjGEwROnxDc9pc=
on_success: always on_success: always
template: template:
- "Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`." - Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>)
- "Execution time: *%{duration}*" for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`.
- "Message: %{message}" - 'Execution time: *%{duration}*'
- 'Message: %{message}'
env:
global:
secure: FD2aOa8L3lWf1xClZ24uS59SOBjMH16sdSLPGkb6bQLwrKAQw6BVna5wOw3iRscZtx2iqEQw3LdLmNb6ftI4fgHhf7qoAZlKVlc2Q8wU4L623Ad8S//2Ny1AxXRyzwmRw4emmIUqRXiGaeZYkzcptf38+2d9PjHazVsL3A6T2vFK+VAQmZBq3Iblx0i3g25qevQxFUACH1FIpZsmn08cesblZp0MiQ7GOq4YhBAqmbraT4/w7yFe1rwm/yPSWeBQKu8tZeZnEW6/FPYidxxuBgl/BxTdVuIKHcVzL95Mu4q6Y7uVaYeGYgyxai8eyntpY2dPu0wN1ng4JxulwqKBdxkWFPdbBJSGnYQq5EmrqULjro7wk9GVLSN9Lx0QjcmZRbNbDH0rpgxcXS9mtvzmgFbmatdsMa3VrObqKL2yYMsPZ6e5N4ve3gTU5+sm6oz/zYNWK2CDN2f08BJuaoKv9hETTfvWaZitKT7lFZ2LpsDdHSPUtRiAviDcLZcCZsTQjyCi6JeKSF2aMQ0+4rCsZgFkqpmjEVJB5N6DMkdZaUn+4HrbGsivAHWQsDcvPTD4n2CUcboV407NFsckr3PlDy0+fNNHr2h45VjO7DxAwDIJAdiwlhbj9l9gn8i3aZOtMCT6p4xIC2CgqOcY4yOTHmyOswJwnkz3uoSOq3eNLR4=