-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.43 KB
/
java-ci-check.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
name: Java CI
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.3
arguments: build
build-root-directory: app
- name: Publish code coverage
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: ${{github.workspace}}/app/src/main/java
with:
coverageCommand: make report
coverageLocations: ${{github.workspace}}/app/build/reports/jacoco/test/jacocoTestReport.xml:jacoco
# deploy:
# needs: build
# runs-on: ubuntu-latest
# if: ${{ github.event_name == 'push' }}
# steps:
# - uses: actions/checkout@v3
# - uses: docker/setup-buildx-action@v2
# - uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - uses: docker/build-push-action@v4
# with:
# context: .
# push: true
# cache-from: hexletcomponents/java-javalin-example:latest
# cache-to: type=inline
# tags: hexletcomponents/java-javalin-example:latest