From 94ccfe8b74f776452d4a2e9be513a1fa0d965a26 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Tue, 16 Jun 2020 18:39:00 +0300 Subject: [PATCH 1/2] Add test workflow to validate versions-manifest.json file --- .github/workflows/releases-validation.yml | 38 +++++++++++++++++++++++ azure-pipelines/run-ci-builds.yml | 6 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/releases-validation.yml diff --git a/.github/workflows/releases-validation.yml b/.github/workflows/releases-validation.yml new file mode 100644 index 0000000..36c83be --- /dev/null +++ b/.github/workflows/releases-validation.yml @@ -0,0 +1,38 @@ +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: Checkout + uses: actions/checkout@v2 + + - 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))' \ No newline at end of file diff --git a/azure-pipelines/run-ci-builds.yml b/azure-pipelines/run-ci-builds.yml index bf1ca43..d58e2e7 100644 --- a/azure-pipelines/run-ci-builds.yml +++ b/azure-pipelines/run-ci-builds.yml @@ -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) \ No newline at end of file + -RetryIntervalSec $(RETRY_INTERVAL_SEC) ` + -RetryCount $(RETRY_COUNT) \ No newline at end of file From 4dee72fe2f6481e57b7e195b0eb2c8bd89d43b11 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Tue, 16 Jun 2020 20:10:32 +0300 Subject: [PATCH 2/2] Remove checkout and update git submodules --- .github/workflows/releases-validation.yml | 3 --- helpers | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/releases-validation.yml b/.github/workflows/releases-validation.yml index 36c83be..5250eee 100644 --- a/.github/workflows/releases-validation.yml +++ b/.github/workflows/releases-validation.yml @@ -16,9 +16,6 @@ jobs: 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: Checkout - uses: actions/checkout@v2 - - name: setup-python ${{ matrix.python }} uses: actions/setup-python@v2 with: diff --git a/helpers b/helpers index 350e288..7f5f554 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit 350e2888aa8ba786f16e7e37479c41551326d25c +Subproject commit 7f5f55457902fc2e94adfd2961ab5b12e136805e