diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e9901862..b67c0766 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,10 +69,29 @@ jobs: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + - name: Set up Dev Drive + uses: samypr100/setup-dev-drive@v4 + with: + workspace-copy: true + trusted-dev-drive: true + drive-size: 6GB + + - name: Use Dev Drive for NuGet packages + shell: pwsh + run: | + $packages = if ($env:NUGET_PACKAGES) { + $env:NUGET_PACKAGES + } else { + Join-Path $env:DEV_DRIVE 'nuget\global-packages' + } + New-Item -ItemType Directory -Force -Path $packages | Out-Null + "NUGET_PACKAGES=$packages" >> $env:GITHUB_ENV + - name: Set up runner uses: ./.github/actions/setup-runner - name: Run tests + working-directory: ${{ env.DEV_DRIVE_WORKSPACE }} run: > dotnet run --project ./build/_build.csproj @@ -82,11 +101,13 @@ jobs: --platform win_x64 - name: Display test results + working-directory: ${{ env.DEV_DRIVE_WORKSPACE }} continue-on-error: true if: always() run: dotnet trx --verbosity normal - name: Check for warnings + working-directory: ${{ env.DEV_DRIVE_WORKSPACE }} run: > dotnet run --project ./build/_build.csproj diff --git a/src/Cli.E2ETests.General/Installation/InstallPsTests.Success.cs b/src/Cli.E2ETests.General/Installation/InstallPsTests.Success.cs index 871d733f..f93f5f72 100644 --- a/src/Cli.E2ETests.General/Installation/InstallPsTests.Success.cs +++ b/src/Cli.E2ETests.General/Installation/InstallPsTests.Success.cs @@ -237,6 +237,7 @@ public async Task InstallCreatesDirectoryIfMissing( string shell ) { [TestCase( "pwsh" )] [TestCase( "powershell" )] + [NonParallelizable] public async Task InstallAddsToUserPath( string shell ) { var tempDir = Path.GetTempPath(); var installDir = Path.Combine( tempDir, "drift-install-ps-path-" + Guid.NewGuid() ); @@ -280,6 +281,7 @@ public async Task InstallAddsToUserPath( string shell ) { [TestCase( "pwsh" )] [TestCase( "powershell" )] + [NonParallelizable] public async Task InstallDoesNotDuplicateInUserPath( string shell ) { var tempDir = Path.GetTempPath(); var installDir = Path.Combine( tempDir, "drift-install-ps-nodup-" + Guid.NewGuid() ); diff --git a/src/Cli.E2ETests.General/Installation/InstallPsTests.cs b/src/Cli.E2ETests.General/Installation/InstallPsTests.cs index 8c38cd82..81c7d914 100644 --- a/src/Cli.E2ETests.General/Installation/InstallPsTests.cs +++ b/src/Cli.E2ETests.General/Installation/InstallPsTests.cs @@ -3,6 +3,7 @@ namespace Drift.Cli.E2ETests.General.Installation; [Platform( "Win" )] +[Parallelizable( ParallelScope.Children )] internal sealed partial class InstallPsTests { private const int ScriptExitCodeSuccess = 0; private const int ScriptExitCodeFailure = 1;