Skip to content

[Test] Feature: ChainToParameterlessConstructor #656

[Test] Feature: ChainToParameterlessConstructor

[Test] Feature: ChainToParameterlessConstructor #656

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: test
run-name: '[Test] ${{ github.event.head_commit.message || github.event.pull_request.title || github.event.workflow_run.display_title || github.ref_name }}'
on:
workflow_run:
workflows: ["build"]
types:
- completed
pull_request:
branches:
- "*"
push:
branches:
- "master"
permissions:
contents: read
checks: write
pull-requests: write
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
defaults:
run:
shell: pwsh
jobs:
test:
runs-on: ubuntu-latest
if: |
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
(github.event_name != 'workflow_run')
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build Solution
run: dotnet build --configuration Release --no-restore
- name: Run Unit Tests
run: dotnet test --configuration Release --no-build --verbosity normal --logger trx --results-directory TestResults
- name: Upload Test Results
uses: actions/upload-artifact@v6
if: success() || failure()
with:
name: test-results-${{ github.run_id }}
path: TestResults/*.trx
retention-days: 7
- name: Publish Test Results
uses: dorny/test-reporter@v2
if: success() || failure()
with:
name: Unit Test Results
path: TestResults/*.trx
reporter: dotnet-trx
fail-on-error: false
token: ${{ secrets.GITHUB_TOKEN }}