Skip to content

Application test and coverage -- Repository context #118

Application test and coverage -- Repository context

Application test and coverage -- Repository context #118

# /********************************************************************************
# * Copyright (c) 2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License, Version 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0.
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# * License for the specific language governing permissions and limitations
# * under the License.
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
name: Application test and coverage -- Repository context
on:
workflow_run:
workflows: [ 'Application test and coverage -- PR context' ]
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
test-app:
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
with:
name: test-results
path: ${{ github.workspace }}/
- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x
dotnet-quality: 'ga'
- name: Generate test report
uses: dorny/test-reporter@v1.6.0
with:
name: Test results
path: 'test-results/test/*.xml'
reporter: java-junit
fail-on-error: false
- name: Create Markdown from code coverage report
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.25
with:
reports: reports/xml/jacoco.xml
targetdir: coveragereport
reporttypes: MarkdownSummaryGithub
sourcedirs: src/main/java
title: 'Code Coverage'
- name: Publish Markdown code coverage report as job summary
run: cat coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY