forked from hyperspy/hyperspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
82 lines (72 loc) · 2.29 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
variables:
MPLBACKEND: agg # Necessary when running test which generate matplotlib figure
ENV_NAME: test_env
RESULT_IMAGES_FOLDER: 'result_images'
trigger:
tags:
include:
# build on any tag
- '*'
branches:
include:
# build on all branches
- '*'
resources:
repositories:
- repository: templates
type: github
name: hyperspy/ci-scripts
# For more details on service connection endpoint, see
# https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints
endpoint: hyperspy # Azure DevOps service connection
strategy:
matrix:
Linux_Python38:
vmImage: 'ubuntu-latest'
PYTHON_VERSION: '3.8'
Linux_Python37:
vmImage: 'ubuntu-latest'
PYTHON_VERSION: '3.7'
Linux_Python36:
vmImage: 'ubuntu-latest'
PYTHON_VERSION: '3.6'
MacOS_Python38:
vmImage: 'macOS-latest'
PYTHON_VERSION: '3.8'
MacOS_Python36:
vmImage: 'macOS-latest'
PYTHON_VERSION: '3.6'
Windows_Python38:
vmImage: 'windows-latest'
PYTHON_VERSION: '3.8'
Windows_Python36:
vmImage: 'windows-latest'
PYTHON_VERSION: '3.6'
pool:
vmImage: '$(vmImage)'
steps:
- template: azure_pipelines/clone_ci-scripts_repo.yml@templates
- template: azure_pipelines/activate_conda.yml@templates
- template: azure_pipelines/setup_anaconda_packages.yml@templates
- bash: |
source activate $ENV_NAME
pip install --no-deps -e .
conda list
displayName: Install package
# Note we must use `-n 2` argument for pytest-xdist due to
# https://github.com/pytest-dev/pytest-xdist/issues/9.
- bash: |
source activate $ENV_NAME
pytest --mpl --pyargs hyperspy --reruns 3 --instafail --mpl-results-path $RESULT_IMAGES_FOLDER
displayName: Run test suite
- publish: $(System.DefaultWorkingDirectory)/$(RESULT_IMAGES_FOLDER)
artifact: $(Agent.JobName)-result_images
displayName: Publish Image Comparison
condition: failed()
- template: azure_pipelines/generate_distribution.yml@templates
- template: azure_pipelines/publish_distribution.yml@templates
# - template: azure_pipelines/update_github_release.yml@templates
# parameters:
# # Set the token generated with github from the developer settings/personal
# # access tokens menu in azure pipeline
# github_token_name: ''