Skip to content
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: 6 additions & 12 deletions azure-pipelines.yml → .azure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
maxParallel: 4

steps:
Expand All @@ -21,38 +23,30 @@ jobs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: python3 -m venv $(System.DefaultWorkingDirectory)
displayName: Create virtual environment

- script: |
source bin/activate
cd generation
curl -sSL https://install.python-poetry.org | python3 -
$HOME/.local/bin/poetry install
displayName: 'Install Poetry'

- script: |
source bin/activate
cd generation
python3 -m black -l 100 --check localizedstringkit/*.py tests/*.py
$HOME/.local/bin/poetry run black -l 100 --check localizedstringkit/*.py tests/*.py
displayName: 'Format Check (Black)'

- script: |
source bin/activate
cd generation
python3 -m pylint --rcfile=pylintrc localizedstringkit tests
$HOME/.local/bin/poetry run pylint --rcfile=pylintrc localizedstringkit tests
displayName: 'Lint'

- script: |
source bin/activate
cd generation
python3 -m mypy --ignore-missing-imports localizedstringkit/ tests/
$HOME/.local/bin/poetry run mypy --ignore-missing-imports localizedstringkit/ tests/
displayName: 'Type Check'

- script: |
source bin/activate
cd generation
python3 -m pytest tests --cov=localizedstringkit --cov-report xml --doctest-modules --junitxml=junit/test-results.xml
$HOME/.local/bin/poetry run pytest tests --cov=localizedstringkit --cov-report xml --doctest-modules --junitxml=junit/test-results.xml
displayName: 'pytest'

- task: PublishTestResults@2
Expand Down
44 changes: 44 additions & 0 deletions .azure/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
trigger:
tags:
include:
- "*"

pool:
vmImage: "ubuntu-latest"

jobs:
- job: "Publish"
pool:
vmImage: "ubuntu-latest"

steps:
- task: UsePythonVersion@0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to run all this in the generation/ folder.

Also, is there an ESRP flow for Swift?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, we don't need do this.

inputs:
versionSpec: "3.x"

- script: |
cd generation
curl -sSL https://install.python-poetry.org | python3 -
displayName: "Install Poetry"

- script: |
cd generation
poetry install
displayName: "Install dependencies"

- script: |
cd generation
poetry build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need to cd generation first, then do build and publish?

displayName: "Build"

- task: EsrpRelease@2
inputs:
ConnectedServiceName: "OM-ESRP-Release-Publishing"
Intent: "PackageDistribution"
ContentType: "PyPi"
PackageLocation: "dist"
Owners: "jizhen@microsoft.com"
Approvers: "jizhen@microsoft.com"
ServiceEndpointUrl: "https://api.esrp.microsoft.com"
MainPublisher: "OutlookMobileiOSESRPPublisher"
DomainTenantId: "72f988bf-86f1-41af-91ab-2d7cd011db47"
Loading