Skip to content

Commit

Permalink
Use a conda env to install ruamel.yaml from pip
Browse files Browse the repository at this point in the history
  • Loading branch information
abergeron committed Sep 30, 2019
1 parent 2d848aa commit a198e45
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ env:
- TEST_SUITE=unit
script:
- if [[ $TEST_SUITE == "static" ]]; then flake8 && pydocstyle myia && isort -c -df; fi
- if [[ $TEST_SUITE == "unit" ]]; then pytest tests --cov=./ --cov-report term-missing; 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
17 changes: 9 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ node ('gpu') {
}
try {
stage ('Test') {
sh script: '$HOME/miniconda/bin/pytest --cov=./ --cov-report= --gpu --junit-xml test-report.xml'
sh script: 'source activate test && pytest --cov=./ --cov-report= --gpu --junit-xml test-report.xml'
}
} finally {
junit 'test-report.xml'
}
stage ('Coverage') {
withEnv(['PATH+CONDA=/home/jenkins/miniconda/bin']) {
sh script: './cov.sh'
sh script: 'coverage xml'
sh script: 'pip install codecov'
withCredentials([string(credentialsId: 'myia_codecov', variable: 'CODECOV_TOKEN')]) {
sh script: 'codecov'
}
sh script: """
source activate test &&
./cov.sh &&
coverage xml
"""
sh script: '$HOME/miniconda/bin/pip install codecov'
withCredentials([string(credentialsId: 'myia_codecov', variable: 'CODECOV_TOKEN')]) {
sh script: '$HOME/miniconda/bin/codecov'
}
}
}
2 changes: 2 additions & 0 deletions ci-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda create -y -n test python=3.7
source activate test
conda install --file=requirements-$DEV.conda
pip install -r requirements.txt
pip install -e . --no-deps
2 changes: 1 addition & 1 deletion requirements-cpu.conda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ numpy
abergeron::tvm==0.6dev+3.*
pytest
pytest-cov
ruamel_yaml
yaml
flake8==3.7.7
pytorch::pytorch==1.1.0
pydocstyle==2.1.1
Expand Down
2 changes: 1 addition & 1 deletion requirements-gpu.conda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ abergeron/label/cuda::tvm-libs
abergeron::tvm==0.6dev+3.*
pytest
pytest-cov
ruamel_yaml
yaml
flake8==3.7.7
pytorch::pytorch==1.1.0
pydocstyle==2.1.1
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
asttokens
codecov
prettyprinter
ruamel.yaml
ruamel.yaml.clib>=0.2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
packages=find_packages(exclude=['docs', 'tests']),
install_requires=['asttokens', 'colorama', 'prettyprinter',
'numpy', 'pyyaml'],
'numpy', 'ruamel.yaml'],
extras_require={
'test': ['flake8', 'pytest', 'codecov', 'isort',
'pytest-cov', 'pydocstyle', 'docopt'],
Expand Down

0 comments on commit a198e45

Please sign in to comment.