-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (60 loc) · 1.95 KB
/
build-gradle.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build Gradle project
on:
push:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-gradle-project:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout project sources
uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Frontend
run: ./gradlew frontend:appNpmBuild
- name: Build Backend
run: ./gradlew build -x test
- name: Test
run: ./gradlew test jacocoTestReport
- name: Build Image
run: ./gradlew jib
- name: Test Results
uses: dorny/test-reporter@v1
if: always()
with:
name: Gradle Tests
path: backend/build/test-results/test/*.xml
reporter: java-junit
fail-on-error: true
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@v4.8
with:
coverage_results_path: backend/build/reports/jacoco/test/jacocoTestReport.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false
minimum_coverage: 80
fail_below_threshold: false
publish_only_summary: false
# Publish Coverage Job Summary # Optional
- name: Add Coverage Job Summary
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY