Merge pull request #34 from actions/v-mazhuk/validate-version-manifest

Add test workflow to validate versions-manifest.json file
This commit is contained in:
MaksimZhukov 2020-06-17 10:45:17 +03:00 committed by GitHub
commit 7ef20701e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 2 deletions

View File

@ -0,0 +1,35 @@
name: Validate 'versions-manifest.json' file
on:
push:
branches:
- master
paths:
- 'versions-manifest.json'
jobs:
setup-versions-from-manifest:
name: Setup ${{ matrix.python }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
steps:
- name: setup-python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Validate version
run: |
$pythonVersion = (python --version)
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
exit 1
}
$pythonVersion
shell: pwsh
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'

View File

@ -29,6 +29,10 @@ jobs:
-AzureDevOpsProjectName $(System.TeamProject) `
-AzureDevOpsAccessToken $(System.AccessToken) `
-SourceBranch $(Build.SourceBranch) `
-DefinitionId $(DEFINITION_ID) `
-SourceVersion $(Build.SourceVersion) `
-ManifestLink $(MANIFEST_LINK) `
-WaitForBuilds $(WAIT_FOR_BUILDS) `
-ToolVersions "$(PYTHON_VERSIONS)" `
-DefinitionId $(DEFINITION_ID)
-RetryIntervalSec $(RETRY_INTERVAL_SEC) `
-RetryCount $(RETRY_COUNT)

@ -1 +1 @@
Subproject commit 350e2888aa8ba786f16e7e37479c41551326d25c
Subproject commit 7f5f55457902fc2e94adfd2961ab5b12e136805e