-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (37 loc) · 1.2 KB
/
jacoco-coverage.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
name: Maven Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up m2 cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run javascript tests
uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "12"
- run: npm install
- run: npm test
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v2.6.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}}/src/main/java"
with:
# The report file must be there, otherwise Code Climate won't find it
coverageCommand: mvn -B test --file pom.xml
coverageLocations: |
${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco
${{github.workspace}}/coverage/lcov.info:lcov