-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 1.03 KB
/
test-and-linter-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
name: Java CI
on: push
jobs:
run-test-and-linter:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle and execute build
uses: gradle/gradle-build-action@v2
with:
arguments: build
build-root-directory: app
- name: Publish code coverage
uses: paambaati/codeclimate-action@v3.2.0
env:
# Set CC_TEST_REPORTER_ID as secret of your repo
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: ${{github.workspace}}/app/src/main/java
with:
# The report file must be there, otherwise Code Climate won't find it
workingDirectory: app
coverageCommand: make report
coverageLocations: ${{github.workspace}}/app/build/reports/jacoco/test/jacocoTestReport.xml:jacoco