-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.06 KB
/
main-ci.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
# main ci workflow is to ensure the codebase builds with the gradle wrapper.
# all unit tests must pass for the workflow to complete successfully.
# a JaCoCo coverage report will be published as an artifact.
name: main-ci
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Execute Gradle build, test and Jacoco test report generation
run: |
sh ./gradlew build test jacocotestreport
- name: Publish JaCoCo test report
run: |
mkdir -p ${{ github.workspace }}/build/reports/jacoco/test
cp -r ktvn/build/reports/jacoco/test jacoco-report
if: always()
- name: Upload JaCoCo Test Report
uses: actions/upload-artifact@v3
with:
name: jacoco-report
path: jacoco-report