-
Notifications
You must be signed in to change notification settings - Fork 17
/
azure-pipelines.yml
53 lines (43 loc) · 1.39 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
variables:
MPLBACKEND: Agg
PYTHON_VERSION: 3.11
trigger:
branches:
include:
- '*' # must quote since "*" is a YAML reserved character; we want a string
jobs:
- job: 'RSMToolTests'
pool:
vmImage: 'windows-latest'
strategy:
parallel: "6"
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: |
conda update --quiet --yes conda
conda info -a
displayName: "Update conda"
- script: |
conda create --name rsmdev --yes --quiet -c conda-forge -c ets python=%PYTHON_VERSION% --file requirements.dev
conda init cmd.exe
CALL activate rsmdev
pip install -e .
displayName: 'Install dependencies & code'
- powershell: ./DistributeTests.ps1
displayName: 'PowerShell Script to distribute tests'
- script: |
CALL activate rsmdev
echo $(pytestfiles)
nose2 -s tests $(pytestfiles)
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: 'junit.xml'
testRunTitle: 'RSMTool tests'
condition: succeededOrFailed()