Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
os: [windows-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-2019, windows-2022]
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 6 additions & 10 deletions Tests/powershell-yaml.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1065,31 +1065,27 @@ reallyLongDecimal: 3.9999999999999990

Describe 'StringQuotingEmitter' {
BeforeAll {
$oldYamlPkgUrl = 'https://www.nuget.org/api/v2/package/YamlDotNet/11.2.1'
$pkgPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-11.2.1.nupkg'
$oldYamlPkgDirPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-11.2.1'
$oldYamlPkgUrl = 'https://www.nuget.org/api/v2/package/YamlDotNet/16.3.0'
$pkgPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-16.3.0.nupkg'
$oldYamlPkgDirPath = Join-Path -Path $TestDrive -ChildPath 'YamlDotNet-16.3.0'
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $oldYamlPkgUrl -UseBasicParsing -OutFile $pkgPath
New-Item -Path $oldYamlPkgDirPath -ItemType Directory
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'
[IO.Compression.ZipFile]::ExtractToDirectory($pkgPath, $oldYamlPkgDirPath)
}

$targetFrameworks = @('net45', 'netstandard1.3')
if ($PSVersionTable['PSEdition'] -eq 'Core')
{
$targetFrameworks = @('netstandard1.3', 'netstandard2.1')
}
$targetFrameworks = @('netstandard2.0')

It 'can be compiled on import with <_>/YamlDotNet.dll loaded' -ForEach $targetFrameworks {
$targetFramework = $_
$yamlDotnetAssemblyPath =
Join-Path -Path $TestDrive -ChildPath "YamlDotNet-11.2.1\lib\${targetFramework}\YamlDotNet.dll" -Resolve
Join-Path -Path $TestDrive -ChildPath "YamlDotNet-16.3.0\lib\${targetFramework}\YamlDotNet.dll" -Resolve
$modulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\powershell-yaml.psd1' -Resolve

{
# Do this in the background because YamlDotNet.dll is already loaded in this session and the way we
# found to reproduce this issue is by loading YamlDotNet 11.2.1 then importing powershell-yaml.
# found to reproduce this issue is by loading YamlDotNet 16.3.0 then importing powershell-yaml.
Start-Job {
$yamlDotnetAssemblyPath = $using:yamlDotnetAssemblyPath
$modulePath = $using:modulePath
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $here = Split-Path -Parent $MyInvocation.MyCommand.Path

dotnet build --configuration Release $here/src/

$destinations = @("netstandard2.1", "net47")
$destinations = @("netstandard2.0")

foreach ($item in $destinations) {
$src = Join-Path $here "src" "bin" "Release" $item "PowerShellYamlSerializer.dll"
Expand Down
Binary file removed lib/net47/PowerShellYamlSerializer.dll
Binary file not shown.
Binary file removed lib/net47/YamlDotNet.dll
Binary file not shown.
Loading