Внедрение ITestOutputHelper через xUnit DI #708
Workflow file for this run
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: Develop Workflow | |
on: | |
push: | |
branches-ignore: | |
- 'release' | |
pull_request_target: | |
branches-ignore: | |
- 'release' | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
build-and-test: | |
name: Build & Test | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.12.0' | |
- name: Determine Version | |
id: version_step | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
- name: Push New Version Tag | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
run: | | |
$gv = 'v${{ steps.version_step.outputs.majorMinorPatch }}' #gitversion result | |
$lt = $( git describe --tags --abbrev=0 ) # last tag version result | |
if ( -Not ( $gv -eq $lt ) ) | |
{ | |
git tag $gv | |
git push origin --tags | |
} | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build /p:Version=${{ steps.version_step.outputs.fullSemVer }} --no-restore -c Release -v n | |
- name: Unit Tests | |
run: | | |
dotnet test -c Release ./tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests.csproj --no-build -v n | |
dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-build -v n --filter="Category=Unit" | |
mkdir coverage-report | |
- name: Code Coverage Summary Report For Merge Request | |
if: github.event_name == 'pull_request_target' | |
uses: 5monkeys/cobertura-action@master | |
with: | |
path: ./tests/HydraScript.Tests/coverage.cobertura.xml | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
minimum_coverage: 20 | |
fail_below_threshold: true | |
show_class_names: true | |
show_missing: true | |
link_missing_lines: true | |
show_branch: true | |
only_changed_files: true | |
- name: ReportGenerator | |
uses: danielpalme/[email protected] | |
with: | |
reports: './tests/HydraScript.Tests/coverage.cobertura.xml' | |
targetdir: './coverage-report' | |
- name: Upload coverage report artifact | |
if: github.event_name == 'push' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CoverageReport | |
path: coverage-report | |
- name: Integration Tests | |
run: dotnet test -c Release --no-build -v n --filter="Category=Integration" | |
- name: Upload Windows Build | |
if: github.ref != 'refs/heads/master' && github.event_name == 'push' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_build_${{ steps.version_step.outputs.fullSemVer }} | |
path: ./src/HydraScript/bin/Release/net8.0 |