Created
April 20, 2021 14:31
-
-
Save KPLauritzen/0e4ed741d2bffe83d1fff8b10d680c61 to your computer and use it in GitHub Desktop.
Pipeline for using micromamba in a azure devops pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
- job: | |
pool: | |
vmImage: 'vs2017-win2016' | |
variables: | |
- name: MAMBA_ROOT_PREFIX | |
value: $(Pipeline.Workspace)\micromambaenv | |
steps: | |
- powershell: | | |
Invoke-Webrequest -URI https://micro.mamba.pm/api/micromamba/win-64/latest -OutFile micromamba.tar.bz2 | |
C:\PROGRA~1\7-Zip\7z.exe x micromamba.tar.bz2 -aoa | |
C:\PROGRA~1\7-Zip\7z.exe x micromamba.tar -ttar -aoa -r Library\bin\micromamba.exe | |
MOVE -Force Library\bin\micromamba.exe micromamba.exe | |
displayName: install micromamba | |
- powershell: | | |
.\micromamba.exe shell hook -s powershell | Out-String | Invoke-Expression | |
micromamba create --yes --name myenv python=3.8 geopandas==0.8 -c conda-forge | |
displayName: Install required packages | |
- powershell: | | |
.\micromamba.exe shell hook -s powershell | Out-String | Invoke-Expression | |
micromamba activate myenv | |
python -m pip install --upgrade pip | |
pip install pytest pytest-azurepipelines | |
pytest -o junit_family=xunit2 --junitxml=junit/unit-test.xml | |
displayName: pytest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
7-zip is not always available on self-hosted agents The following is bit shorter and robust.