Skip to content

Commit

Permalink
adding tox for matrix of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Nov 5, 2019
1 parent 0fe5026 commit 7e8f420
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .ci/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
trigger:
- master

jobs:
- job: 'Test'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
py36:
python.version: '3.6'
tox.env: py36
py37:
python.version: '3.7'
tox.env: py37

steps:
- task: UsePythonVersion@0
displayName: Get Python for Python tools.
inputs:
versionSpec: '3.7'
addToPath: false
name: pyTools

- script: $(pyTools.pythonLocation)/bin/python -m pip install -U tox
displayName: Install Python-based tools.

- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
displayName: Use cached Python $(python.version) for tests.

- script: $(pyTools.pythonLocation)/bin/tox -e $(tox.env)
env:
TOX_AP_TEST_EXTRAS: azure-pipelines
displayName: run tox -e $(tox.env)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ htmlcov
exoplanet_version.py
env
venv-test
.tox
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"files.trimTrailingWhitespace": true,
"C_Cpp.autoAddFileAssociations": false,
"editor.formatOnSave": true,
"python.pythonPath": "${workspaceFolder}/env/bin/python"
"python.pythonPath": "${workspaceFolder}/env/bin/python",
"git.ignoreLimitWarning": true
}
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ numpy>=1.13.0
pymc3>=3.5
astropy>=3.1
rebound_pymc3>=0.0.3
setuptools>=40.6.0
setuptools_scm
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
envlist = envlist = py36,py37
isolated_build = True

[testenv]
setenv =
VIRTUALENV_NO_DOWNLOAD=1
deps = -rrequirements-test.txt
commands =
{envbindir}/python setup.py develop
{envbindir}/python -m pytest -vs src/exoplanet

0 comments on commit 7e8f420

Please sign in to comment.