chore: refactor tests (#66) #127
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: Windows | |
on: | |
push: | |
paths: | |
- 'RTWLib_CLI/**' | |
- 'RTWLib_Tests/**' | |
- 'RTWLibPlus/**' | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build-windows: | |
runs-on: windows-latest # For a list of available runner types, refer to | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
env: | |
Solution_Name: '\RTWLIB_CLI\RTWLIB_CLI.sln' # Replace with your solution name, i.e. MyWpfApp.sln. | |
Test_Project_Path: './RTWLib_Tests/RTWLib_Tests.csproj' # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Copy Resources | |
run: cp -r ./RTWLib_Tests/resources ./RTWLib_Tests/bin/Debug/netcoreapp8.0/resources | |
- name: Log files | |
run: ls ./RTWLib_Tests/bin/Debug/netcoreapp8.0/ | |
- name: Restore packages | |
run: dotnet restore ./RTWLib_CLI/RTWLib_CLI.csproj | |
- name: Build with dotnet | |
run: dotnet build ./RTWLib_CLI/RTWLib_CLI.csproj --configuration Release --no-restore | |
- name: Execute unit tests | |
run: dotnet test ${{ env.Test_Project_Path }} |