48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: CI-winpeas_test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- winpeas_dev
|
|
paths:
|
|
- 'build_lists\sensitive_files.yaml'
|
|
- 'winPEAS\winPEASexe\**'
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
Build_and_test_winpeas:
|
|
runs-on: windows-latest
|
|
|
|
# environment variables
|
|
env:
|
|
Solution_Path: 'winPEAS\winPEASexe\winPEAS.sln'
|
|
Configuration: 'Release'
|
|
|
|
steps:
|
|
# checkout
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v1.0.2
|
|
|
|
# Setup NuGet
|
|
- name: Setup NuGet.exe
|
|
uses: nuget/setup-nuget@v1
|
|
|
|
# Restore the packages for testing
|
|
- name: Restore the application
|
|
# run: msbuild -m $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration
|
|
run: nuget restore $env:Solution_Path
|
|
|
|
# build
|
|
- name: run MSBuild
|
|
run: msbuild $env:Solution_Path
|
|
|
|
# Execute all unit tests in the solution
|
|
- name: Execute unit tests
|
|
run: dotnet test $env:Solution_Path
|