-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.49 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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/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