Skip to content

feat: migrate project from GitHub Enterprise (#2) #2

feat: migrate project from GitHub Enterprise (#2)

feat: migrate project from GitHub Enterprise (#2) #2

Workflow file for this run

name: Run tests and code checks
on:
push:
branches:
- main
pull_request:
permissions:
# Required by mikepenz/action-junit-report
checks: write
# Required by actions/checkout
contents: read
# Required by mi-kas/kover-report
pull-requests: write
jobs:
test:
name: Test
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- name: Run test
run: ./gradlew check --no-daemon
- name: Publish test reports
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: |
**/build/test-results/test/TEST-*.xml
- name: Create coverage report
if: ${{ github.event.pull_request }}
run: ./gradlew koverXmlReport
- name: Post coverage report as comment
if: ${{ github.event.pull_request }}
uses: mi-kas/kover-report@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: |
${{ github.workspace }}/build/reports/kover/report.xml
title: Code Coverage
update-comment: true
min-coverage-overall: 80
min-coverage-changed-files: 80
coverage-counter-type: LINE