Skip to content

Commit

Permalink
Add OSX to azure (sagemath#10)
Browse files Browse the repository at this point in the history
* Add OSX to azure

* Remove publishTestResult
  • Loading branch information
marcelotrevisani committed Jan 7, 2020
1 parent caccc60 commit da20b76
Showing 1 changed file with 56 additions and 6 deletions.
62 changes: 56 additions & 6 deletions azure-pipelines.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -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}

0 comments on commit da20b76

Please sign in to comment.