-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
65 lines (54 loc) · 1.87 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
64
65
# 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
SKLLVERSION: 5.0.1
TESTDIR: $(Build.SourcesDirectory)\skllcode
trigger: none
pr:
- master
jobs:
- job: 'SKLLTests'
pool:
vmImage: 'windows-latest'
strategy:
parallel: 6
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: |
mkdir skllcode
cd skllcode
git init
git remote add -f origin https://github.com/EducationalTestingService/skll.git
git config core.sparsecheckout true
echo tests/* > .git/info/sparse-checkout
echo examples/* >> .git/info/sparse-checkout
git pull --depth=1 origin main
displayName: "Clone SKLL tests"
- script: |
conda update --quiet --yes conda
conda info -a
displayName: "Update conda"
- script: |
conda create --name skllenv --yes --quiet -c conda-forge -c ets python=%PYTHON_VERSION%
conda init cmd.exe
CALL activate skllenv
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple skll==%SKLLVERSION% nose2
displayName: 'Install TestPyPI package for SKLL'
- powershell: ./DistributeTests.ps1
displayName: 'PowerShell Script to distribute tests'
- script: |
echo $(pytestfiles)
CALL activate skllenv
nose2 -s %TESTDIR%\tests --plugin nose2.plugins.junitxml --junit-xml $(pytestfiles)
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: 'nose2-junit.xml'
testRunTitle: 'SKLL tests'
condition: succeededOrFailed()