Skip to content

Commit

Permalink
Revert test workflow to windows-2019
Browse files Browse the repository at this point in the history
Reverts creating a ReFS dev drive in favor of more predictable VM initialization.
  • Loading branch information
Qonfused committed Oct 27, 2024
1 parent be4080e commit 37168ea
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

0 comments on commit 37168ea

Please sign in to comment.