Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 1ES PT #221

Merged
merged 3 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions eng/ci/code-mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
trigger:
branches:
include:
- dev
- release/*

resources:
repositories:
- repository: eng
type: git
name: engineering
ref: refs/tags/release

variables:
- template: ci/variables/cfs.yml@eng

extends:
template: ci/code-mirror.yml@eng
50 changes: 50 additions & 0 deletions eng/ci/official-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
trigger:
batch: true
branches:
include:
- dev
- release/*

# CI only, does not trigger on PRs.
pr: none

schedules:
- cron: '0 0 * * MON'
displayName: At 12:00 AM, only on Monday
branches:
include:
- dev
always: true

resources:
repositories:
- repository: 1es
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: eng
type: git
name: engineering
ref: refs/tags/release

variables:
- template: ci/variables/build.yml@eng
- template: ci/variables/cfs.yml@eng

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows

stages:
- stage: Build
jobs:
- template: /eng/templates/build.yml@self

- stage: RunTests
dependsOn: Build
jobs:
- template: /eng/templates/ci-tests.yml@self
43 changes: 43 additions & 0 deletions eng/ci/public-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
trigger:
batch: true
branches:
include:
- dev

pr:
branches:
include:
- dev

schedules:
- cron: '0 0 * * MON'
displayName: At 12:00 AM, only on Monday
branches:
include:
- dev
always: true

resources:
repositories:
- repository: 1es
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc-public
image: 1es-windows-2022
os: windows

stages:
- stage: Build
jobs:
- template: /eng/templates/build.yml@self

- stage: RunTests
dependsOn: Build
jobs:
- template: /eng/templates/ci-tests.yml@self
21 changes: 21 additions & 0 deletions eng/templates/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
jobs:
- job: "Build"
displayName: 'Build Python SDK'

pool:
name: 1es-pool-azfunc-public
image: 1es-windows-2022
os: windows

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.11"
- bash: |
python --version
displayName: 'Check python version'
- bash: |
python -m pip install -U pip
pip install twine wheel
python setup.py sdist bdist_wheel
displayName: 'Build Python SDK'
32 changes: 32 additions & 0 deletions eng/templates/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
jobs:
- job: "TestPython"
displayName: "Run Python SDK Unit Tests"

pool:
name: 1es-pool-azfunc
image: 1es-ubuntu-22.04
os: linux

strategy:
matrix:
python-37:
PYTHON_VERSION: '3.7'
python-38:
PYTHON_VERSION: '3.8'
python-39:
PYTHON_VERSION: '3.9'
python-310:
PYTHON_VERSION: '3.10'
python-311:
PYTHON_VERSION: '3.11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
- bash: |
python -m pip install --upgrade pip
python -m pip install -U -e .[dev]
displayName: 'Install dependencies'
- bash: |
python -m pytest --cache-clear --cov=./azure --cov-report=xml --cov-branch tests
displayName: 'Test with pytest'
Loading