Merge pull request #117 from guitarrapc/dependabot/nuget/xunit-2.9.3 #180
This file contains hidden or 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: dotnet-build | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
issue_comment: | |
types: [created] | |
env: | |
BUILD_CONFIG: Debug | |
jobs: | |
build-dotnet: | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@actions /build')) }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Get PR branch | |
uses: xt0rted/pull-request-comment-branch@v3 | |
id: comment-branch | |
if: ${{ github.event_name == 'issue_comment' }} | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event_name == 'issue_comment' && steps.comment-branch.outputs.head_ref || ''}} | |
- uses: guitarrapc/actions/.github/actions/setup-dotnet@main | |
- name: Build | |
run: dotnet build -c ${{ env.BUILD_CONFIG }} | |
- name: Test | |
run: dotnet test --no-build -c ${{ env.BUILD_CONFIG }} --logger GitHubActions --logger "console;verbosity=normal" |