Skip to content

Commit

Permalink
#80 Integrate coveralls into build (#84)
Browse files Browse the repository at this point in the history
* Add Coveralls action
* Add build badge from GitHub actions to readme
  • Loading branch information
ljacqu committed Jun 21, 2023
1 parent 24cf9dd commit 7749936
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/maven_build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Maven build with various JDK versions
name: Maven build

on: [push]
on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
java: ['8', '11', '17']
name: Java ${{ matrix.java }} build

steps:
- uses: actions/checkout@v3
- name: Set up Java
Expand All @@ -19,4 +18,12 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B --file pom.xml package jacoco:report

- name: Coveralls
uses: coverallsapp/github-action@v2
if: matrix.java == '8' && github.event_name != 'pull_request'
with:
base-path: src/main/java
# The file is optional, but the documentation says it's better to specify it.
file: target/site/jacoco/jacoco.xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Java type resolver
[![Build Status](https://travis-ci.org/ljacqu/JavaTypeResolver.svg?branch=master)](https://travis-ci.org/ljacqu/JavaTypeResolver)
[![Build Status](https://github.com/ljacqu/JavaTypeResolver/actions/workflows/maven_build.yml/badge.svg)](https://github.com/ljacqu/JavaTypeResolver/actions?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/ljacqu/JavaTypeResolver/badge.svg?branch=master)](https://coveralls.io/github/ljacqu/JavaTypeResolver?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/a19c4b3ca6ea5ed5d083/maintainability)](https://codeclimate.com/github/ljacqu/JavaTypeResolver/maintainability)

Expand Down

0 comments on commit 7749936

Please sign in to comment.