98 строки
3.2 KiB
YAML
98 строки
3.2 KiB
YAML
parameters:
|
|
- name: POST_RESULT
|
|
displayName: Post GitHub issue with results
|
|
type: boolean
|
|
default: true
|
|
- name: DIAGNOSTIC_OUTPUT
|
|
displayName: Log diagnostic data
|
|
type: boolean
|
|
default: false
|
|
- name: REPO_COUNT
|
|
displayName: Repo Count
|
|
type: number
|
|
default: 300
|
|
- name: REPO_START_INDEX
|
|
displayName: Repo Start Index
|
|
type: number
|
|
default: 0
|
|
- name: OLD_VERSION
|
|
displayName: Baseline TypeScript package version
|
|
type: string
|
|
default: latest
|
|
- name: NEW_VERSION
|
|
displayName: Candidate TypeScript package version
|
|
type: string
|
|
default: next
|
|
- name: MACHINE_COUNT
|
|
displayName: Machine Count
|
|
type: number
|
|
default: 8
|
|
- name: ENTRYPOINT
|
|
displayName: TypeScript entrypoint
|
|
type: string
|
|
- name: LANGUAGE
|
|
displayName: Language of repos on GitHub (tsserver only)
|
|
type: string
|
|
- name: PRNG_SEED
|
|
displayName: Pseudo-random number generator seed
|
|
type: string
|
|
default: 'n/a'
|
|
|
|
jobs:
|
|
- job: ListRepos
|
|
steps:
|
|
- task: UseNode@1
|
|
inputs:
|
|
version: '20.x'
|
|
displayName: 'Install Node.js'
|
|
- script: |
|
|
npm ci
|
|
npm run build
|
|
mkdir artifacts
|
|
node dist/listTopRepos ${{ parameters.LANGUAGE }} ${{ parameters.REPO_COUNT }} ${{ parameters.REPO_START_INDEX }} artifacts/repos.json
|
|
displayName: 'List top TS repos'
|
|
env:
|
|
GITHUB_PAT: $(GITHUB_PAT)
|
|
- publish: artifacts
|
|
artifact: RepoList
|
|
- job: DetectNewErrors
|
|
dependsOn: ListRepos
|
|
continueOnError: true
|
|
timeoutInMinutes: 360
|
|
strategy:
|
|
parallel: ${{ parameters.MACHINE_COUNT }}
|
|
steps:
|
|
- download: current
|
|
artifact: RepoList
|
|
- task: UseNode@1
|
|
inputs:
|
|
version: '20.x'
|
|
displayName: 'Install Node.js'
|
|
- script: |
|
|
npm ci
|
|
npm run build
|
|
npm install -g pnpm
|
|
mkdir 'RepoResults$(System.JobPositionInPhase)'
|
|
node dist/checkGithubRepos ${{ parameters.ENTRYPOINT }} ${{ parameters.OLD_VERSION }} ${{ parameters.NEW_VERSION }} '$(Pipeline.Workspace)/RepoList/repos.json' $(System.TotalJobsInPhase) $(System.JobPositionInPhase) 'RepoResults$(System.JobPositionInPhase)' ${{ parameters.DIAGNOSTIC_OUTPUT }} ${{ parameters.PRNG_SEED }}
|
|
displayName: 'Run TypeScript on repos'
|
|
continueOnError: true
|
|
env:
|
|
GITHUB_PAT: $(GITHUB_PAT)
|
|
- publish: 'RepoResults$(System.JobPositionInPhase)'
|
|
artifact: 'RepoResults$(System.JobPositionInPhase)'
|
|
- job: ReportNewErrors
|
|
dependsOn: DetectNewErrors
|
|
steps:
|
|
- download: current
|
|
- task: UseNode@1
|
|
inputs:
|
|
version: '20.x'
|
|
displayName: 'Install Node.js'
|
|
- script: |
|
|
npm ci
|
|
npm run build
|
|
node dist/postGithubIssue ${{ parameters.ENTRYPOINT }} ${{ parameters.LANGUAGE }} ${{ parameters.REPO_COUNT }} ${{ parameters.REPO_START_INDEX }} '$(Pipeline.Workspace)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)&view=artifacts&type=publishedArtifacts' ${{ parameters.POST_RESULT }} '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/artifacts'
|
|
displayName: 'Create issue from new errors'
|
|
env:
|
|
GITHUB_PAT: $(GITHUB_PAT)
|