From da20b7681b093b105449c72f49042f6de15f1fcd Mon Sep 17 00:00:00 2001 From: Marcelo Duarte Trevisani Date: Tue, 7 Jan 2020 19:00:12 +0000 Subject: [PATCH] Add OSX to azure (#10) * Add OSX to azure * Remove publishTestResult --- azure-pipelines.yml | 62 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4e763db27c7..487c2c32eaa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,8 @@ variables: grayskull_deps: pytest pytest-azurepipelines pytest-xdist pytest-cov requests pyyaml jobs: - - job: Linux + - job: + displayName: Linux pool: vmImage: 'ubuntu-latest' strategy: @@ -45,12 +46,61 @@ jobs: --cov= \ --cov-append \ --cov-report html:/tmp/grayskull/converage-html \ - --cov-report xml:coverage.xml \ + --cov-report xml:junit/coverage.xml \ + --test-run-title="Linux-py${PYTHON_VERSION}" \ --cov-config=$(Build.Repository.LocalPath)/.coveragerc \ --junit-xml=junit/Linux-py${PYTHON_VERSION}.xml \ --junit-prefix=Linux-py${PYTHON_VERSION} - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'junit/*.xml' - condition: succeededOrFailed() + - job: + displayName: OSX + pool: + vmImage: 'macOS-10.13' + strategy: + matrix: + python38: + python.version: '3.8' + python37: + python.version: '3.7' + maxParallel: 8 + + steps: + - bash: | + echo "##vso[task.prependpath]$CONDA/bin" + displayName: Add conda to PATH + + - bash: sudo chown -R $USER $CONDA + displayName: Take ownership of conda installation (Workaround) + + - bash: conda update conda --yes + displayName: Update Conda version + + - bash: | + conda config --add channels conda-forge + conda create --yes --name grayskull + displayName: Create Conda environment (grayskull) + + - bash: | + conda config --add channels conda-forge + conda info -a + displayName: Add Conda-Forge channel + + - bash: | + source activate grayskull + conda install --yes python=$PYTHON_VERSION $(grayskull_deps) + conda list + displayName: Installing dependencies + + - bash: | + source activate grayskull + pytest tests \ + -n auto \ + --color=yes \ + --cov= \ + --cov-append \ + --cov-report html:/tmp/grayskull/converage-html \ + --cov-report xml:junit/coverage.xml \ + --test-run-title="OSX-py${PYTHON_VERSION}" \ + --cov-config=$(Build.Repository.LocalPath)/.coveragerc \ + --junit-xml=junit/OSX-py${PYTHON_VERSION}.xml \ + --junit-prefix=OSX-py${PYTHON_VERSION}