forked from sakura-editor/sakura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.job.python-check.yml
43 lines (36 loc) · 1.45 KB
/
template.job.python-check.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
#############################################################################################################
# Python のコンパイルチェックを行う 'steps' を定義するテンプレート
#
# parameters
# versionSpec : Python のバージョン
# architecture : Python のアーキテクチャ
#
#############################################################################################################
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops&viewFallbackFrom=vsts#passing-parameters
parameters:
# defaults parameters
name: ''
vmImage: ''
displayName: ''
jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
python3:
versionSpec: '3.x'
steps:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azure-devops
- task: UsePythonVersion@0
displayName: UsePythonVersion $(versionSpec)
inputs:
versionSpec: $(versionSpec)
- script: python --version
displayName: version check $(versionSpec)
- script: python -m compileall -f .
displayName: python compile check before install $(versionSpec)
- template: /ci/azure-pipelines/template.steps.install-python-modules.yml
- script: python -m compileall -f .
displayName: python compile check after install $(versionSpec)