Skip to content

build-test

build-test #33

Workflow file for this run

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: '9.0.x'
- name: Build
run: dotnet build ./tests/StaticInput.UnitTests/StaticInput.UnitTests.csproj
- name: Update Powershell
run: dotnet tool update --global PowerShell
- name: Install playwright browsers
run: pwsh ./tests/StaticInput.UnitTests/bin/Debug/net9.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