mirror of
https://github.com/hanzoai/azure-sdk-for-js.git
synced 2026-10-30 19:51:51 +00:00
Fixes #25684 * Removes docker container * Updates relevant scripts and removes old code paths * Adds job to upgrade the REX tool if tests pass Example runs: * Successful run of daily pipeline: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3298420&view=logs&j=f8e040b3-c0ff-5789-0eda-99daaaa3fc1b&t=7702a9c8-4b61-5cd3-c28d-9b1cea81bf7e * Successful SDK package release: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3302248&view=logs&j=19b87903-f8bc-5cbb-22d9-4f6eb3469d8e&t=39d7f548-7a77-5d57-b2f3-bf0cc5f8dda2&l=150 * Successful docindex run: * pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3298899&view=logs&j=dc056dfc-c0cf-5958-c8c4-8da4f91a3739&t=dc056dfc-c0cf-5958-c8c4-8da4f91a3739 * diff showing package upgrades did not change (may show drift as packages release, focus on `ci-configs/packages-*.json`): https://github.com/MicrosoftDocs/azure-docs-sdk-node/compare/djurek/rex-tests?expand=1 * Tool upgrade: * No new version: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3298685&view=logs&j=f0b9ce84-b5fb-5cd2-d7e4-8e2b722448a2&t=95e002a9-090a-5230-9ea9-b23402ed153e * New version test and upgrade: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3298739&view=logs&j=f0b9ce84-b5fb-5cd2-d7e4-8e2b722448a2&t=95e002a9-090a-5230-9ea9-b23402ed153e * PR: https://github.com/Azure/azure-sdk-for-js/pull/27917 * New version test fails: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3298727&view=logs&j=f0b9ce84-b5fb-5cd2-d7e4-8e2b722448a2&t=95e002a9-090a-5230-9ea9-b23402ed153e
38 lines
1.2 KiB
PowerShell
38 lines
1.2 KiB
PowerShell
Import-Module Pester
|
|
|
|
BeforeDiscovery {
|
|
$RexToolSpecs = Get-Content "$PSScriptRoot/rex-tool-tests.json" | ConvertFrom-Json -AsHashtable
|
|
}
|
|
|
|
BeforeAll {
|
|
. $PSScriptRoot/../../../common/scripts/common.ps1
|
|
|
|
# Returns a package info object with Name and Version properties
|
|
# "@microsoft/[email protected]" -> @{ Name = "@microsoft/sample-package"; Version = "1.2.3" }
|
|
# "@microsoft/sample-package" -> @{ Name = "@microsoft/sample-package"; Version = "" }
|
|
# "[email protected]" -> @{ Name = "sample-package"; Version = "1.2.3" }
|
|
function getPackageInfo($packageName) {
|
|
$output = @{ Name = $packageName; Version = '' }
|
|
|
|
if ($packageName -match '^(?<pkgName>.+?)(@(?<pkgVersion>.+))?$') {
|
|
$pkgName = $Matches['pkgName']
|
|
$pkgVersion = $Matches['pkgVersion']
|
|
$output.Name = $pkgName
|
|
$output.Version = $pkgVersion
|
|
}
|
|
|
|
return $output
|
|
}
|
|
|
|
}
|
|
|
|
Describe "Validate-javascript-DocMsPackages" -Tag "LiveTests" {
|
|
It "Package <Package> returns result <ExpectedResult>" -ForEach $RexToolSpecs {
|
|
|
|
$packageInfo = getPackageInfo($Package)
|
|
|
|
$output = Validate-javascript-DocMsPackages -PackageInfo $packageInfo
|
|
$output | Should -Be $ExpectedResult
|
|
}
|
|
}
|