✅Unit Testing Status Check (Debug Build) #487
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: ✅Unit Testing Status Check | |
run-name: ✅Unit Testing Status Check ${{ github.base_ref == 'main' && '(Release Build)' || '(Debug Build)' }} | |
defaults: | |
run: | |
shell: pwsh | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main, preview] | |
jobs: | |
determine_build_config: | |
name: Determine Build Configuration | |
runs-on: ubuntu-latest | |
outputs: | |
build-config: ${{ steps.get-build-config.outputs.build-config }} | |
steps: | |
- name: Get Build Config | |
id: get-build-config | |
run: | | |
# If the destination branch that the pull request is merging into is the main, do a release build | |
if ("${{ github.base_ref }}" -eq "main") { | |
"build-config=Release" >> $env:GITHUB_OUTPUT; | |
} else { # Any other branch than main, do a debug build | |
"build-config=Debug" >> $env:GITHUB_OUTPUT; | |
} | |
run_tests: | |
name: Running ${{ vars.PROJECT_NAME }} Unit Tests | |
needs: determine_build_config | |
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v6.2.1 | |
with: | |
project-name: "${{ vars.PROJECT_NAME }}Tests" | |
build-config: ${{ needs.determine_build_config.outputs.build-config }} | |
net-sdk-version: "${{ vars.NET_SDK_VERSION }}" |