From 41675e98efffb3f82a6fa9b2ae72745a13714966 Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Thu, 27 Jun 2019 10:49:41 -0700 Subject: [PATCH] whitespace --- ci/azure/add-conda-to-path.yml | 3 +++ ci/azure/install.yml | 4 ++++ ci/azure/unit-tests.yml | 10 ++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ci/azure/add-conda-to-path.yml b/ci/azure/add-conda-to-path.yml index d88984bf102..e5173835388 100644 --- a/ci/azure/add-conda-to-path.yml +++ b/ci/azure/add-conda-to-path.yml @@ -1,14 +1,17 @@ # https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda steps: + - bash: | echo "##vso[task.prependpath]$CONDA/bin" displayName: Add conda to PATH (Linux) condition: eq(variables['Agent.OS'], 'Linux') + - bash: | echo "##vso[task.prependpath]$CONDA/bin" sudo chown -R $USER $CONDA displayName: Add conda to PATH (OS X) condition: eq(variables['Agent.OS'], 'Darwin') + - powershell: | Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: Add conda to PATH (Windows) diff --git a/ci/azure/install.yml b/ci/azure/install.yml index a892f0e3f5d..8d9b3daec0e 100644 --- a/ci/azure/install.yml +++ b/ci/azure/install.yml @@ -2,14 +2,18 @@ parameters: env_file: ci/requirements-$CONDA_ENV.yml steps: + - template: add-conda-to-path.yml + - bash: | conda env create -n test_env --file ${{ parameters.env_file }} displayName: Install dependencies + - bash: | source activate test_env pip install --no-deps -e . displayName: Install xarray + - bash: | source activate test_env conda list diff --git a/ci/azure/unit-tests.yml b/ci/azure/unit-tests.yml index 0b8afd190e3..2ddeb2edba2 100644 --- a/ci/azure/unit-tests.yml +++ b/ci/azure/unit-tests.yml @@ -1,20 +1,26 @@ steps: + - template: install.yml + - bash: | source activate test_env python -OO -c "import xarray" displayName: Import xarray + - bash: | source activate test_env pytest xarray --junitxml=junit/test-results.xml \ --cov=xarray --cov-config=ci/.coveragerc --cov-report=xml $EXTRA_FLAGS displayName: Run tests - # TODO: upload coverage results, once we can merge them across multiple jobs - # https://stackoverflow.com/questions/56776185 + + # TODO: publish coverage results to Azure, once we can merge them across + # multiple jobs: https://stackoverflow.com/questions/56776185 + - bash: | source activate test_env COVERALLS_REPO_TOKEN=$(coverallsToken) COVERALLS_PARALLEL=true coveralls displayName: Upload coverage to coveralls + - task: PublishTestResults@2 condition: succeededOrFailed() inputs: