Update dotnet-desktop.yml #466
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
name: .NET Desktop | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
Build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
configuration: [ | |
GitHub | |
] | |
solution: [ | |
src/ReaLTaiizor.sln, | |
sample/ReaLTaiizor.Defender/ReaLTaiizor.Defender.sln, | |
sample/ReaLTaiizor.GenshinImpact/ReaLTaiizor.GenshinImpact.sln, | |
sample/ReaLTaiizor.Instagram/ReaLTaiizor.Instagram.sln, | |
sample/ReaLTaiizor.Kaspersky/ReaLTaiizor.Kaspersky.sln, | |
sample/ReaLTaiizor.Login/ReaLTaiizor.Login.sln, | |
sample/ReaLTaiizor.Payment/ReaLTaiizor.Payment.sln, | |
sample/ReaLTaiizor.Player/ReaLTaiizor.Player.sln, | |
sample/ReaLTaiizor.Rufus/ReaLTaiizor.Rufus.sln, | |
sample/ReaLTaiizor.Splash/ReaLTaiizor.Splash.sln, | |
sample/ReaLTaiizor.Store/ReaLTaiizor.Store.sln, | |
sample/ReaLTaiizor.XAMPP/ReaLTaiizor.XAMPP.sln, | |
ready/ReaLTaiizor.AppLocker/ReaLTaiizor.AppLocker.sln, | |
ready/ReaLTaiizor.Hashing/ReaLTaiizor.Hashing.sln, | |
ready/ReaLTaiizor.MAChanger/ReaLTaiizor.MAChanger.sln, | |
ready/ReaLTaiizor.Nerator/ReaLTaiizor.Nerator.sln, | |
ready/ReaLTaiizor.Portscan/ReaLTaiizor.Portscan.sln, | |
ready/ReaLTaiizor.Stopwatch/ReaLTaiizor.Stopwatch.sln, | |
ready/ReaLTaiizor.Translate/ReaLTaiizor.Translate.sln, | |
demo/ReaLTaiizor.UI/ReaLTaiizor.UI.sln, | |
demo/ReaLTaiizor.UX/ReaLTaiizor.UX.sln | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Ensure .editorconfig exists in all solution directories | |
- name: Apply .editorconfig to all solutions | |
shell: pwsh | |
run: | | |
$solutions = @( | |
"src/ReaLTaiizor.sln", | |
"sample/ReaLTaiizor.Defender/ReaLTaiizor.Defender.sln", | |
"sample/ReaLTaiizor.GenshinImpact/ReaLTaiizor.GenshinImpact.sln", | |
"sample/ReaLTaiizor.Instagram/ReaLTaiizor.Instagram.sln", | |
"sample/ReaLTaiizor.Kaspersky/ReaLTaiizor.Kaspersky.sln", | |
"sample/ReaLTaiizor.Login/ReaLTaiizor.Login.sln", | |
"sample/ReaLTaiizor.Payment/ReaLTaiizor.Payment.sln", | |
"sample/ReaLTaiizor.Player/ReaLTaiizor.Player.sln", | |
"sample/ReaLTaiizor.Rufus/ReaLTaiizor.Rufus.sln", | |
"sample/ReaLTaiizor.Splash/ReaLTaiizor.Splash.sln", | |
"sample/ReaLTaiizor.Store/ReaLTaiizor.Store.sln", | |
"sample/ReaLTaiizor.XAMPP/ReaLTaiizor.XAMPP.sln", | |
"ready/ReaLTaiizor.AppLocker/ReaLTaiizor.AppLocker.sln", | |
"ready/ReaLTaiizor.Hashing/ReaLTaiizor.Hashing.sln", | |
"ready/ReaLTaiizor.MAChanger/ReaLTaiizor.MAChanger.sln", | |
"ready/ReaLTaiizor.Nerator/ReaLTaiizor.Nerator.sln", | |
"ready/ReaLTaiizor.Portscan/ReaLTaiizor.Portscan.sln", | |
"ready/ReaLTaiizor.Stopwatch/ReaLTaiizor.Stopwatch.sln", | |
"ready/ReaLTaiizor.Translate/ReaLTaiizor.Translate.sln", | |
"demo/ReaLTaiizor.UI/ReaLTaiizor.UI.sln", | |
"demo/ReaLTaiizor.UX/ReaLTaiizor.UX.sln" | |
) | |
foreach ($solution in $solutions) { | |
$solutionDir = Split-Path -Path $solution | |
Copy-Item -Path ".editorconfig" -Destination "$solutionDir\.editorconfig" -Force | |
} | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 9.0.x | |
dotnet-quality: preview | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1.3.1 | |
# Execute all unit tests in the solution | |
- name: Execute Unit Tests | |
run: dotnet test ${{ matrix.solution }} -c ${{ matrix.configuration }} /nowarn:CS0067,CS0108,CS0109,CS0114,CS0169,CS0414,CS0649,CA1416,NU5104,NETSDK1138,SYSLIB0003 | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
- name: Restore the ReaLTaiizor | |
run: msbuild ${{ matrix.solution }} /t:Restore /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} |