Skip to content

Commit

Permalink
Revert to original test result reporting
Browse files Browse the repository at this point in the history
May still be a good idea to update to a non-deprecated action for publishing test results
  • Loading branch information
beau-witter committed Feb 18, 2023
1 parent aa33ffe commit ec1ec3c
Showing 1 changed file with 68 additions and 47 deletions.
115 changes: 68 additions & 47 deletions .github/workflows/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,64 +192,85 @@ jobs:
shell: pwsh
run: ./Build/Invoke-ModuleTests.ps1

- name: Upload Test Results
- name: Publish Test Results
if: always()
uses: actions/upload-artifact@v3
uses: MirageNet/nunit-reporter@v1.0.5
with:
name: ${{matrix.os}}-Test-Results
path: ${{github.workspace}}/${{env.TestFile}}

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
access-token: ${{ secrets.GITHUB_TOKEN }}
path: '${{github.workspace}}\${{env.TestFile}}'

- name: Generate Code Coverage
uses: danielpalme/ReportGenerator-GitHub-Action@4.8.8
with:
name: ${{matrix.os}}-Test-Results
path: ${{ github.event_path }}

- name: Upload Coverage Results
if: always()
reports: '${{github.workspace}}\${{env.CodeCoverageFile}}'
targetdir: '${{github.workspace}}\coveragereports'
sourcedirs: ${{env.ModuleFolders}}
title: PSKoans Code Coverage

- name: Publish Code Coverage artifacts
uses: actions/upload-artifact@v3
with:
name: ${{matrix.os}}-Test-Results
path: ${{github.workspace}}/${{env.CodeCoverageFile}}
name: 'Code Coverage Reports'
path: '${{github.workspace}}\coveragereports'

# - name: Upload Test Results
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: ${{matrix.os}}-Test-Results
# path: ${{github.workspace}}/${{env.TestFile}}

# - name: Upload Test Results
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: ${{matrix.os}}-Test-Results
# path: ${{ github.event_path }}

# - name: Upload Coverage Results
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: ${{matrix.os}}-Test-Results
# path: ${{github.workspace}}/${{env.CodeCoverageFile}}

report-tests:
needs: test
if: always()
runs-on: ubuntu-latest
permissions:
checks: write
# report-tests:
# needs: test
# if: always()
# runs-on: ubuntu-latest
# permissions:
# checks: write

steps:
- uses: actions/checkout@v3
# steps:
# - uses: actions/checkout@v3

- name: Download Test Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
# - name: Download Test Artifacts
# uses: actions/download-artifact@v2
# with:
# path: artifacts

- name: Generate Code Coverage
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.17
with:
reports: 'artifacts/**/*coverage.xml'
targetdir: '${{github.workspace}}/coveragereports'
sourcedirs: '${{env.ModuleFolders}}'
title: PSKoans Code Coverage
# - name: Generate Code Coverage
# uses: danielpalme/ReportGenerator-GitHub-Action@5.1.17
# with:
# reports: 'artifacts/**/*coverage.xml'
# targetdir: '${{github.workspace}}/coveragereports'
# sourcedirs: '${{env.ModuleFolders}}'
# title: PSKoans Code Coverage

- name: Publish Code Coverage artifacts
uses: actions/upload-artifact@v3
with:
name: 'CodeCoverageReport'
path: '${{github.workspace}}/coveragereports'
# - name: Publish Code Coverage artifacts
# uses: actions/upload-artifact@v3
# with:
# name: 'CodeCoverageReport'
# path: '${{github.workspace}}/coveragereports'

event_file:
runs-on: ubuntu-latest
steps:
- name: Upload Event File
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
# event_file:
# runs-on: ubuntu-latest
# steps:
# - name: Upload Event File
# uses: actions/upload-artifact@v3
# with:
# name: Event File
# path: ${{ github.event_path }}

publish:
needs: test
Expand Down

0 comments on commit ec1ec3c

Please sign in to comment.