Executing Build for CodeCyclone on microsoft/powerbi-powershell for branch refs/pull/401/merge #8
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
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: PR Build | |
run-name: Executing Build for ${{ github.actor }} on ${{ github.repository }} for branch ${{ github.ref }} | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- master | |
jobs: | |
Build: | |
runs-on: [self-hosted, 1ES.Pool=powerbi-powershell-pool] | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Disable StrongName | |
shell: pwsh | |
run: | | |
scripts/DisableStrongName.ps1 | |
- name: Setup .NET 8.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
# Semantic version range syntax or exact version of a dotnet version | |
dotnet-version: '8.x' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Restore dependencies | |
run: dotnet restore dirs.proj | |
- name: Build | |
run: dotnet build --no-restore dirs.proj | |
- name: Test | |
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults" dirs.proj | |
- name: Publish Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: TestResults | |
path: TestResults | |
if: ${{ always() }} |