chore(deps): bump Moq from 4.18.4 to 4.20.69 #1218
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
name: Build XOutput | |
env: | |
VERSION: 4.0.0 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build_net: | |
runs-on: windows-latest | |
env: | |
SERVER_TARGET: 'net7.0' | |
GUI_TARGET: 'net7.0-windows' | |
SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0.x' | |
- uses: actions/[email protected] | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Cache app | |
uses: actions/cache@v3 | |
with: | |
key: app-${{ github.sha }} | |
path: ./app | |
- name: Clean | |
run: dotnet clean --configuration Release && dotnet nuget locals all --clear | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Install SonaScanner | |
run: dotnet tool install --global dotnet-sonarscanner | |
- name: Build and test | |
if: github.ref != 'refs/heads/master' | |
shell: powershell | |
run: | | |
dotnet build -c Release -p:Version=$env:VERSION -p:AssemblyVersion=$env:VERSION -p:FileVersion=$env:VERSION | |
dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and test and analysis | |
if: github.ref == 'refs/heads/master' | |
shell: powershell | |
run: | | |
dotnet sonarscanner begin /k:XOutput /d:sonar.host.url=https://sonarcloud.io /o:csutorasa /d:sonar.login=$env:SONARCLOUD_TOKEN /d:sonar.coverage.exclusions="**Tests*.cs" | |
dotnet build -c Release -p:Version=$env:VERSION -p:AssemblyVersion=$env:VERSION -p:FileVersion=$env:VERSION | |
dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
dotnet sonarscanner end /d:sonar.login=$env:SONARCLOUD_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Copy artifacts | |
shell: powershell | |
run: | | |
New-Item -ItemType Directory -Force -Path app | |
Move-Item XOutput.Core\bin\Release\$env:SERVER_TARGET\XOutput.Core.dll app\XOutput.Core.dll -Force | |
Move-Item XOutput.Api\bin\Release\$env:SERVER_TARGET\XOutput.Api.dll app\XOutput.Api.dll -Force | |
Move-Item XOutput.Emulation\bin\Release\$env:SERVER_TARGET\XOutput.Emulation.dll app\XOutput.Emulation.dll -Force | |
Move-Item XOutput.Mapping\bin\Release\$env:SERVER_TARGET\XOutput.Mapping.dll app\XOutput.Mapping.dll -Force | |
Move-Item XOutput.Server\bin\Release\$env:SERVER_TARGET\XOutput.Server.dll app\XOutput.Server.dll -Force | |
Move-Item XOutput.Server\bin\Release\$env:SERVER_TARGET\XOutput.Server.exe app\XOutput.Server.exe -Force | |
Move-Item XOutput.Server\bin\Release\$env:SERVER_TARGET\XOutput.Server.runtimeconfig.json app\XOutput.Server.runtimeconfig.json -Force | |
Move-Item XOutput.Server\bin\Release\$env:SERVER_TARGET\Nefarius.ViGEm.Client.dll app\Nefarius.ViGEm.Client.dll -Force | |
Move-Item XOutput.Server\bin\Release\$env:SERVER_TARGET\NLog.dll app\NLog.dll -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\XOutput.App.dll app\XOutput.App.dll -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\XOutput.App.exe app\XOutput.App.exe -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\XOutput.App.runtimeconfig.json app\XOutput.App.runtimeconfig.json -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\SharpDX.dll app\SharpDX.dll -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\SharpDX.DirectInput.dll app\SharpDX.DirectInput.dll -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\Hardcodet.NotifyIcon.Wpf.dll app\Hardcodet.NotifyIcon.Wpf.dll -Force | |
Move-Item XOutput.App\bin\Release\$env:GUI_TARGET\HIDSharp.dll app\HIDSharp.dll -Force | |
build_node: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Cache webapp | |
uses: actions/cache@v3 | |
with: | |
key: webapp-${{ github.sha }} | |
path: ./@xoutput/webapp/webapp | |
- name: Install pnpm | |
run: npm install --global pnpm | |
- name: Install dependencies | |
run: pnpm -r install | |
- name: Run lint | |
run: pnpm -r run lint | |
- name: Build webapp | |
run: pnpm -r --workspace-concurrency=1 run build | |
- name: Test webapp | |
run: pnpm -r test | |
create_package: | |
runs-on: windows-latest | |
needs: [ build_net, build_node ] | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache app | |
uses: actions/cache@v3 | |
with: | |
key: app-${{ github.sha }} | |
path: ./app | |
- name: Cache webapp | |
uses: actions/cache@v3 | |
with: | |
key: webapp-${{ github.sha }} | |
path: ./@xoutput/webapp/webapp | |
- name: Copy resources | |
run: move bin app\bin && move @xoutput\webapp\webapp app\webapp | |
- name: Create package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: XOutput | |
path: ./app/ |