Publish test results as GitHub Checks. (#168)

pull/164/head
Laurents Meyer 2 years ago committed by GitHub
parent 528df20e25
commit 53b0aee7d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,7 @@ env:
skipTests: false skipTests: false
deterministicTests: true deterministicTests: true
autoCommitGreenTests: true autoCommitGreenTests: true
uploadTestResults: false uploadTestResults: true
jobs: jobs:
Preconditions: Preconditions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -213,33 +213,38 @@ jobs:
run: | run: |
& '${{ env.dotnetExecutable }}' build --configuration '${{ env.buildConfiguration }}' & '${{ env.dotnetExecutable }}' build --configuration '${{ env.buildConfiguration }}'
- name: 'Run Tests: EFCore.Jet.Data.Tests' - name: 'Run Tests: EFCore.Jet.Data.Tests'
if: env.skipTests != 'true' if: always() && env.skipTests != 'true'
shell: pwsh shell: pwsh
run: | run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}' $env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}'
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Data.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m & '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Data.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
- name: 'Run Tests: EFCore.Jet.Tests'
if: always() && env.skipTests != 'true'
shell: pwsh
run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}'
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
- name: 'Run Tests: EFCore.Jet.FunctionalTests' - name: 'Run Tests: EFCore.Jet.FunctionalTests'
if: env.skipTests != 'true' if: always() && env.skipTests != 'true'
shell: pwsh shell: pwsh
run: | run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}' $env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}'
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.FunctionalTests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m & '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.FunctionalTests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
exit 0 exit 0
- name: 'Run Tests: EFCore.Jet.Tests' - name: 'Rename Test Results'
if: env.skipTests != 'true' if: always() && env.skipTests != 'true'
shell: pwsh shell: pwsh
run: | run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}' Get-ChildItem -Filter '*.trx' -Recurse | Sort-Object LastWriteTime | ForEach { Rename-Item $_.FullName "ace_${{ matrix.aceVersion }}_$('${{ matrix.dataAccessProviderType }}'.Replace(' ', '').ToLowerInvariant())_${{ matrix.aceArchitecture }}_$($_.Name)" -Verbose }
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
- name: 'Upload Test Results' - name: 'Upload Test Results'
if: env.skipTests != 'true' && env.uploadTestResults == 'true' if: always() && env.skipTests != 'true' && env.uploadTestResults == 'true'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: test-results name: test-results
path: | path: |
test\EFCore.Jet.Data.Tests\TestResults test\EFCore.Jet.Data.Tests\TestResults\*.trx
test\EFCore.Jet.FunctionalTests\TestResults test\EFCore.Jet.FunctionalTests\TestResults\*.trx
test\EFCore.Jet.Tests\TestResults test\EFCore.Jet.Tests\TestResults\*.trx
- name: 'Check Tests: EFCore.Jet.FunctionalTests' - name: 'Check Tests: EFCore.Jet.FunctionalTests'
if: env.skipTests != 'true' if: env.skipTests != 'true'
shell: pwsh shell: pwsh

@ -13,7 +13,7 @@ env:
buildConfiguration: 'Debug' buildConfiguration: 'Debug'
skipTests: false skipTests: false
deterministicTests: true deterministicTests: true
uploadTestResults: false uploadTestResults: true
jobs: jobs:
Preconditions: Preconditions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -212,33 +212,38 @@ jobs:
run: | run: |
& '${{ env.dotnetExecutable }}' build --configuration '${{ env.buildConfiguration }}' & '${{ env.dotnetExecutable }}' build --configuration '${{ env.buildConfiguration }}'
- name: 'Run Tests: EFCore.Jet.Data.Tests' - name: 'Run Tests: EFCore.Jet.Data.Tests'
if: env.skipTests != 'true' if: always() && env.skipTests != 'true'
shell: pwsh shell: pwsh
run: | run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}' $env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}'
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Data.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m & '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Data.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
- name: 'Run Tests: EFCore.Jet.Tests'
if: always() && env.skipTests != 'true'
shell: pwsh
run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}'
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
- name: 'Run Tests: EFCore.Jet.FunctionalTests' - name: 'Run Tests: EFCore.Jet.FunctionalTests'
if: env.skipTests != 'true' if: always() && env.skipTests != 'true'
shell: pwsh shell: pwsh
run: | run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}' $env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}'
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.FunctionalTests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m & '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.FunctionalTests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
exit 0 exit 0
- name: 'Run Tests: EFCore.Jet.Tests' - name: 'Rename Test Results'
if: env.skipTests != 'true' if: always() && env.skipTests != 'true'
shell: pwsh shell: pwsh
run: | run: |
$env:EFCoreJet_DefaultConnection = '${{ env.defaultConnection }}' Get-ChildItem -Filter '*.trx' -Recurse | Sort-Object LastWriteTime | ForEach { Rename-Item $_.FullName "ace_${{ matrix.aceVersion }}_$('${{ matrix.dataAccessProviderType }}'.Replace(' ', '').ToLowerInvariant())_${{ matrix.aceArchitecture }}_$($_.Name)" -Verbose }
& '${{ env.dotnetExecutable }}' test .\test\EFCore.Jet.Tests --configuration '${{ env.buildConfiguration }}' -p:FixedTestOrder=${{ env.deterministicTests }} --logger trx --verbosity detailed --blame-hang-timeout 3m
- name: 'Upload Test Results' - name: 'Upload Test Results'
if: env.skipTests != 'true' && env.uploadTestResults == 'true' if: always() && env.skipTests != 'true' && env.uploadTestResults == 'true'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: test-results name: test-results
path: | path: |
test\EFCore.Jet.Data.Tests\TestResults test\EFCore.Jet.Data.Tests\TestResults\*.trx
test\EFCore.Jet.FunctionalTests\TestResults test\EFCore.Jet.FunctionalTests\TestResults\*.trx
test\EFCore.Jet.Tests\TestResults test\EFCore.Jet.Tests\TestResults\*.trx
- name: 'Check Tests: EFCore.Jet.FunctionalTests' - name: 'Check Tests: EFCore.Jet.FunctionalTests'
if: env.skipTests != 'true' if: env.skipTests != 'true'
shell: pwsh shell: pwsh

Loading…
Cancel
Save