Browse code

Merge pull request #153 from python-adaptive/ci_improvements

invoke conda directly in CI

Bas Nijholt authored on 05/03/2019 17:50:28 • GitHub committed on 05/03/2019 17:50:28
Showing 3 changed files
... ...
@@ -101,6 +101,7 @@ def test_ipyparallel_executor(ipyparallel_executor):
101 101
     assert learner.npoints > 0
102 102
 
103 103
 
104
+@pytest.mark.timeout(60)
104 105
 @pytest.mark.skipif(not with_distributed, reason='dask.distributed is not installed')
105 106
 def test_distributed_executor(dask_executor):
106 107
     learner = Learner1D(linear, (-1, 1))
... ...
@@ -1,27 +1,18 @@
1 1
 steps:
2
-- task: CondaEnvironment@1
3
-  inputs:
4
-    packageSpecs: >
5
-      python=3.6
6
-      sortedcontainers
7
-      sortedcollections
8
-      scipy
9
-      holoviews
10
-      ipyparallel
11
-      distributed
12
-      ipykernel>=4.8*
13
-      jupyter_client>=5.2.2
14
-      ipywidgets
15
-      scikit-optimize
16
-      plotly
17
-    createCustomEnvironment: true
18
-    createOptions: "-c conda-forge"
19
-    environmentName: 'adaptive'
2
+- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
3
+  displayName: Add conda to PATH
20 4
 
21
-- script: pip install -r test-requirements.txt
5
+- script: conda env create --quiet --file environment.yml
6
+  displayName: Create Anaconda environment
7
+
8
+- script: |
9
+    source activate adaptive
10
+    pip install -r test-requirements.txt
22 11
   displayName: 'Install test-requirements.txt'
23 12
 
24
-- script: py.test --verbose --cov=adaptive --cov-report term --cov-report html adaptive
13
+- script: |
14
+    source activate adaptive
15
+    py.test --verbose --cov=adaptive --cov-report term --cov-report html adaptive
25 16
   displayName: 'Run the tests'
26 17
 
27 18
 - script: |
... ...
@@ -1,4 +1,5 @@
1
+pexpect
1 2
 pytest
2
-pytest-randomly
3 3
 pytest-cov
4
-pexpect
4
+pytest-randomly
5
+pytest-timeout