diff --git a/.travis.yml b/.travis.yml index 23ea43fc3..e3aafa685 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ env: - TEST_SUITE=static - TEST_SUITE=unit script: - - if [[ $TEST_SUITE == "static" ]]; then flake8 && pydocstyle myia && isort -c -df; fi + - if [[ $TEST_SUITE == "static" ]]; then source activate test && flake8 && pydocstyle myia && isort -c -df; fi - if [[ $TEST_SUITE == "unit" ]]; then source activate test && pytest tests --cov=./ --cov-report term-missing; fi after_success: - if [[ $TEST_SUITE == "unit" ]]; then codecov; fi diff --git a/Jenkinsfile b/Jenkinsfile index b396e5434..d718bd67a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,18 +7,18 @@ node ('gpu') { } try { stage ('Test') { - sh script: 'source activate test && pytest --cov=./ --cov-report= --gpu --junit-xml test-report.xml' + sh script: '. $HOME/miniconda/bin/activate test && pytest --cov=./ --cov-report= --gpu --junit-xml test-report.xml' } } finally { junit 'test-report.xml' } stage ('Coverage') { sh script: """ -source activate test && +. $HOME/miniconda/bin/activate test && ./cov.sh && coverage xml """ - sh script: '$HOME/miniconda/bin/pip install codecov' + sh script: '$HOME/mimiconda/bin/pip install codecov' withCredentials([string(credentialsId: 'myia_codecov', variable: 'CODECOV_TOKEN')]) { sh script: '$HOME/miniconda/bin/codecov' } diff --git a/ci-install.sh b/ci-install.sh index 70fc12103..c9da0b736 100755 --- a/ci-install.sh +++ b/ci-install.sh @@ -24,6 +24,7 @@ hash -r conda config --set always_yes yes --set changeps1 no conda update -q conda conda create -y -n test python=3.7 +conda init source activate test conda install --file=requirements-$DEV.conda pip install -r requirements.txt diff --git a/requirements-cpu.conda b/requirements-cpu.conda index 95ea8171e..af468236b 100644 --- a/requirements-cpu.conda +++ b/requirements-cpu.conda @@ -6,7 +6,7 @@ pytest pytest-cov yaml flake8==3.7.7 -pytorch::pytorch==1.1.0 +pytorch::pytorch-cpu==1.1.0 pydocstyle==2.1.1 isort==4.3.21 docopt==0.6.2