Trying tests in the build action #55
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 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' # SDK Version to use. | |
# other tests require a desktop environment as they start cmd.exe and winver.exe processes | |
- run: dotnet test -c release --filter "FullyQualifiedName~ProcessGovernor.Tests.Code.ProgramTests.ParseArgs" | |
working-directory: ./procgov-tests | |
- run: dotnet publish -c release -r win-x64 | |
working-directory: ./procgov | |
- name: Copy artifacts | |
run: | | |
New-Item -Type Directory -Path artifacts | |
Copy-Item -Path "procgov/bin/release/net9.0-windows/win-x64/publish/procgov.exe" -Destination "artifacts/procgov.exe" | |
Copy-Item -Path "procgov/bin/release/net9.0-windows/win-x64/publish/procgov.pdb" -Destination "artifacts/procgov.pdb" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: procgov | |
path: artifacts/* |