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

[typespec-pr] Add pipeline #24802

Merged
merged 5 commits into from
Jul 13, 2023
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
27 changes: 5 additions & 22 deletions eng/pipelines/typespec-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,11 @@ pr:
- typespec-next
paths:
include:
- package.json
- package-lock.json
- eng/pipelines/typespec-ci.yml
- eng/pipelines/templates/steps/typespec-ci.yml
- eng/tools/TypeSpecValidation
- specification/contosowidgetmanager
- specification/cognitiveservices
- specification/confidentialledger
- specification/containerservice
- specification/containerstorage
- specification/eventgrid
- specification/servicenetworking
- specification/sphere
- specification/translation
- '*' # any file in repo root, like "package.json" or ".prettierrc.json"
- eng

jobs:
- job: TypeSpecCI
- job: Validate_All_Specs
pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: ubuntu-22.04
Expand All @@ -41,11 +29,6 @@ jobs:
condition: succeededOrFailed()

- pwsh: |
if ('$(Build.Reason)' -eq 'PullRequest') {
$(Build.SourcesDirectory)/eng/scripts/Validate-TypeSpec.ps1 $(Build.SourcesDirectory) "origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}"
}
else {
$(Build.SourcesDirectory)/eng/scripts/Validate-TypeSpec.ps1 $(Build.SourcesDirectory)
}
displayName: Validate TypeSpec
$(Build.SourcesDirectory)/eng/scripts/Validate-TypeSpec.ps1 $(Build.SourcesDirectory)
displayName: Validate All Specs
condition: succeededOrFailed()
32 changes: 32 additions & 0 deletions eng/pipelines/typespec-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
trigger: none

pr:
branches:
include:
- main
- typespec-next
paths:
include:
- specification

jobs:
- job: Validate_Changed_Specs
pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: ubuntu-22.04

steps:
- script: npm ci
displayName: npm ci

- script: npm ls -a
displayName: npm ls -a
condition: succeededOrFailed()

- pwsh: |
$(Build.SourcesDirectory)/eng/scripts/Validate-TypeSpec.ps1 `
$(Build.SourcesDirectory) `
"origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" `
"${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}"
displayName: Validate Changed Specs
condition: succeededOrFailed()