-
Notifications
You must be signed in to change notification settings - Fork 34
36 lines (33 loc) · 1016 Bytes
/
maven-ci.yaml
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
name: Java CI
on:
push:
branches: '*'
paths-ignore:
- '**.md'
- '**.txt'
- '**.gitignore'
- '**.gif'
- '**.png'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Build test with coverage
run: mvn --batch-mode --update-snapshots clean test -Djacoco.skip=false
- name: Upload coverage to Codacy
shell: bash
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
echo "Argblarb line 1"
echo "Argblarb $GITHUB_SHA"
echo "Argblarb line 3"
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Java --force-coverage-parser jacoco --commit-uuid $GITHUB_SHA --project-token $CODACY_PROJECT_TOKEN $(find -name 'jacoco*.xml' -printf '-r %p ')