Skip to content

Commit

Permalink
Fix env actiavtion
Browse files Browse the repository at this point in the history
  • Loading branch information
abergeron committed Sep 30, 2019
1 parent a198e45 commit a4aeb13
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ 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: 'pip install codecov'
withCredentials([string(credentialsId: 'myia_codecov', variable: 'CODECOV_TOKEN')]) {
sh script: '$HOME/miniconda/bin/codecov'
sh script: 'codecov'
}
}
}
1 change: 1 addition & 0 deletions ci-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements-cpu.conda
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a4aeb13

Please sign in to comment.