-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.39 KB
/
JavaCI.yml
File metadata and controls
51 lines (42 loc) · 1.39 KB
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
name: Java CI
run-name: ${{ github.actor }} is testing out GitHub Actions
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
Java-project-71:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}/app
steps:
- name: Checout code
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4.2.2
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
with:
gradle-version: '8.7'
- name: Start build
run: make build
- name: Start test
run: make test
- name: Start report
run: make report
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v9.0.0
env:
# Set CC_TEST_REPORTER_ID as secret of your repo
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: app/src/main/java
with:
# The report file must be there, otherwise Code Climate won't find
coverageCommand: make -C app report
coverageLocations: ${{github.workspace}}/app/build/reports/jacoco/test/jacocoTestReport.xml:jacoco