Skip to content

Commit 7ef2070

Browse files
authored
Merge pull request #34 from actions/v-mazhuk/validate-version-manifest
Add test workflow to validate versions-manifest.json file
2 parents 6e82fdd + 4dee72f commit 7ef2070

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Validate 'versions-manifest.json' file
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- 'versions-manifest.json'
8+
9+
jobs:
10+
setup-versions-from-manifest:
11+
name: Setup ${{ matrix.python }} ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [macos-latest, windows-latest, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
17+
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
18+
steps:
19+
- name: setup-python ${{ matrix.python }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python }}
23+
24+
- name: Validate version
25+
run: |
26+
$pythonVersion = (python --version)
27+
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
28+
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
29+
exit 1
30+
}
31+
$pythonVersion
32+
shell: pwsh
33+
34+
- name: Run simple code
35+
run: python -c 'import math; print(math.factorial(5))'

azure-pipelines/run-ci-builds.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
-AzureDevOpsProjectName $(System.TeamProject) `
3030
-AzureDevOpsAccessToken $(System.AccessToken) `
3131
-SourceBranch $(Build.SourceBranch) `
32+
-DefinitionId $(DEFINITION_ID) `
3233
-SourceVersion $(Build.SourceVersion) `
34+
-ManifestLink $(MANIFEST_LINK) `
35+
-WaitForBuilds $(WAIT_FOR_BUILDS) `
3336
-ToolVersions "$(PYTHON_VERSIONS)" `
34-
-DefinitionId $(DEFINITION_ID)
37+
-RetryIntervalSec $(RETRY_INTERVAL_SEC) `
38+
-RetryCount $(RETRY_COUNT)

0 commit comments

Comments
 (0)