From 37168ea16b53cdb1f6fc777d45bf756a7b3c3886 Mon Sep 17 00:00:00 2001 From: Cory Bennett <32466081+Qonfused@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:36:46 -0500 Subject: [PATCH] Revert test workflow to windows-2019 Reverts creating a ReFS dev drive in favor of more predictable VM initialization. --- .github/workflows/test.yml | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7635cb7..823f6c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,33 +18,16 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: test: - runs-on: windows-latest - name: "Run Tests" + runs-on: windows-2019 + name: "Run SDK Tests" steps: - # Creates a dev drive using ReFS. + # Fetches remote repository without --progress option. # - # This step creates a 10GB VHDX file, mounts it, initializes the disk, - # creates a partition, and formats the volume using ReFS. The drive letter - # is stored in the DEV_DRIVE environment variable for later use. - - name: Create dev drive using ReFS - run: | - $VHD_PATH = "${{ github.workspace }}/dev.vhdx" - $Volume = New-VHD -Path $VHD_PATH -SizeBytes 10GB -Fixed | - Mount-VHD -Passthru | - Initialize-Disk -Passthru | - New-Partition -AssignDriveLetter -UseMaximumSize | - Format-Volume -FileSystem ReFS -Confirm:$false -Force - Write-Output "WORKSPACE=$($Volume.DriveLetter):/workspace" >> $env:GITHUB_ENV - - # Checks out the repository to the dev drive. - # - # This is a patch of the actions/checkout action to allow for `path` to - # point to another drive. By default, this is restricted to paths relative - # to the $GITHUB_WORKSPACE directory, which is slower than a ReFS VHDX. + # The default behavior of @actions/checkout outputs many noisy lines of + # status output in the workflow log, which is problematic for log size. - name: Checkout latest repository commit - uses: Qonfused/checkout@4.2.2 + uses: actions/checkout@v4 with: - path: ${{ env.WORKSPACE }} show-progress: false fetch-depth: 0 # Disable shallow clone for Nerdbank.GitVersioning @@ -60,29 +43,25 @@ jobs: id: nuget-cache uses: actions/cache@v4 with: - path: ${{ env.WORKSPACE }}/packages + path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} restore-keys: | ${{ runner.os }}-nuget- - name: Restore NuGet packages if: steps.nuget-cache.outputs.cache-hit != 'true' - run: nuget restore -Verbosity quiet -NonInteractive -UseLockFile -OutputDirectory "${{ env.WORKSPACE }}/packages" - working-directory: ${{ env.WORKSPACE }} + run: nuget restore -Verbosity quiet -NonInteractive -UseLockFile # Build the SDK - name: Build SDK Solution run: dotnet build - working-directory: ${{ env.WORKSPACE }} # Create .env file for integration tests - name: Create .env file run: | echo "USERNAME=${{ secrets.USERNAME }}" > .env echo "PASSWORD=${{ secrets.PASSWORD }}" >> .env - working-directory: ${{ env.WORKSPACE }} # Run the test suite - name: Run tests run: dotnet test --no-build -clp:NoSummary - working-directory: ${{ env.WORKSPACE }}