Use MSTest.SDK #154
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Actions definition for CI build. | |
name: CI Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
WinBuildTest: | |
name: Windows build and test | |
runs-on: windows-2022 # 2019 is not sufficient, Windows 21H1+ is best for ReFS bug fixes | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
# No "with: dotnet-version" specified -> use global.json | |
- name: Setup x86 .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
architecture: x86 | |
- run: dotnet restore | |
- run: dotnet build --configuration Release --no-restore | |
- name: Shrink C drive and create a ReFS E drive, then run tests | |
run: | | |
mkdir c:\ReFS | |
dir c:\ | |
echo SELECT VOLUME C: >DiskPartScript.txt | |
echo SHRINK DESIRED=10240 >>DiskPartScript.txt | |
echo CREATE PARTITION PRIMARY >>DiskPartScript.txt | |
echo LIST PARTITION >>DiskPartScript.txt | |
echo FORMAT QUICK FS=ReFS LABEL="ReFS Test" >>DiskPartScript.txt | |
echo ASSIGN LETTER=E >>DiskPartScript.txt | |
echo LIST VOLUME >>DiskPartScript.txt | |
echo ASSIGN MOUNT=C:\ReFS >>DiskPartScript.txt | |
diskpart /s DiskPartScript.txt | |
if not exist E:\ echo ERROR: diskpart failed && exit /b 1 | |
if not exist C:\ReFS echo ERROR: diskpart failed && exit /b 1 | |
@rem CODESYNC: WindowsReFSDriveSession.cs | |
set CoW_Test_ReFS_Drive=E:\ | |
dotnet test --configuration Release --no-build | |
shell: cmd |