-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
63 lines (52 loc) · 1.72 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
54
55
56
57
58
59
60
61
62
63
# 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
RSMVERSION: 12.0.0
TESTDIR: $(Build.SourcesDirectory)\rsmcode\tests
BINPATH: C:\Miniconda\envs\rsmenv\Scripts
trigger: none
pr:
- master
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: |
mkdir rsmcode
cd rsmcode
git init
git remote add -f origin https://github.com/EducationalTestingService/rsmtool.git
git config core.sparsecheckout true
echo tests/* > .git/info/sparse-checkout
git pull --depth=1 origin main
displayName: "Clone RSMTool tests"
- script: |
conda update --quiet --yes conda
conda info -a
displayName: "Update conda"
- script: |
conda create --name rsmenv --yes --quiet -c conda-forge -c ets python=%PYTHON_VERSION% rsmtool=%RSMVERSION% nose2 parameterized
conda init cmd.exe
displayName: 'Install RSMTool Package & Dependencies'
- powershell: ./DistributeTests.ps1
displayName: 'PowerShell Script to distribute tests'
- script: |
echo $(pytestfiles)
CALL activate rsmenv
nose2 --quiet -s %TESTDIR% $(pytestfiles)
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: 'junit.xml'
testRunTitle: 'RSMTool tests'
condition: succeededOrFailed()