-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·57 lines (48 loc) · 1.46 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: "Build and Test"
on:
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: "Set Up JDK"
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: gradle
- name: "Grant execute permission for gradlew"
run: chmod +x gradlew
- name: "Build with Gradle"
run: ./gradlew build -x allTest
shell: bash
- name: "Tests"
run: ./gradlew cleanAllTest allTest
shell: bash
- name: "Tests Report"
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: jUnit Tests
path: '**/build/test-results/jvmTest/TEST-*.xml'
reporter: java-junit
- name: "Run Coverage"
if: ${{ github.event_name == 'pull_request' }}
run: ./gradlew koverXmlReport
shell: bash
- name: "Coverage Report"
uses: mi-kas/kover-report@v1
if: ${{ github.event_name == 'pull_request' }}
with:
path: |
./ktor-simple-cache/build/reports/kover/report.xml
./ktor-simple-memory-cache/build/reports/kover/report.xml
./ktor-simple-redis-cache/build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: "Coverage Report"
update-comment: true