-
Notifications
You must be signed in to change notification settings - Fork 44
50 lines (48 loc) · 1.5 KB
/
Copy pathgradle.yml
File metadata and controls
50 lines (48 loc) · 1.5 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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Gradle Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set-up-jdk
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: gradlew-permission
run: chmod +x gradlew
- name: build-and-test
run: ./gradlew clean build -x test
env:
OSSRHUSERNAME: ${{ secrets.OSSRHUSERNAME }}
OSSRHPASSWORD: ${{ secrets.OSSRHPASSWORD }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: codecov report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/jacoco/report.xml
verbose: false
- name: jacoco-badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
- name: log-jacoco-coverage-percent
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: commit-badges
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
message: 'commit badges'
add: '*.svg'