build-test #13
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-test | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch name' | |
required: true | |
default: 'master' | |
pull_request: | |
jobs: | |
test: | |
if: "!startsWith(github.event.pull_request.title, '[build]') && !startsWith(github.event.pull_request.title, '[chore]')" | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
env: | |
ASPNETCORE_ENVIRONMENT: Development | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build | |
run: dotnet build ./tests/StaticInput.UnitTests/StaticInput.UnitTests.csproj | |
- name: Install playwright browsers | |
run: pwsh ./tests/StaticInput.UnitTests/bin/Debug/net8.0/playwright.ps1 install --with-deps | |
- name: Run tests | |
run: > | |
dotnet test ./tests/StaticInput.UnitTests | |
--configuration Release | |
--logger trx | |
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
- name: Upload Test Result Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: ${{ github.workspace }}/**/TestResults/**/* | |
retention-days: 5 | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2.16.1 | |
if: always() | |
with: | |
files: ${{ github.workspace }}/**/*.trx |