Skip to content

Commit fbe20ce

Browse files
authored
Merge pull request #19 from EasyPost/coveralls
feat: adds coveralls support on CI
2 parents 04ea3d7 + cdcf95a commit fbe20ce

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
javaversion: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18" ]
14+
javaversion: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ]
1515
steps:
1616
- uses: actions/checkout@v3
1717
- name: Load Maven dependencies cache
@@ -29,7 +29,22 @@ jobs:
2929
distribution: "zulu"
3030
java-version: ${{ matrix.javaversion }}
3131
- name: Build and test with Maven
32-
run: make test
32+
run: make coverage
33+
- name: Load Rust cache
34+
if: github.ref == 'refs/heads/main'
35+
uses: Swatinem/rust-cache@v2
36+
- name: Install grcov
37+
if: github.ref == 'refs/heads/main'
38+
run: cargo install grcov
39+
- name: Convert coverage report
40+
if: github.ref == 'refs/heads/main'
41+
run: grcov target/site/jacoco/jacoco.xml --source-dir ./ --ignore "target/*" > coverage.lcov
42+
- name: Coveralls
43+
if: github.ref == 'refs/heads/main'
44+
uses: coverallsapp/github-action@master
45+
with:
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
path-to-lcov: "./coverage.lcov"
3348
lint:
3449
runs-on: ubuntu-latest
3550
steps:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ cassettes/
3131

3232
# macOS Finder preferences
3333
.DS_Store
34+
35+
# Coverage
36+
*.lcov

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ scan:
5353
test:
5454
mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true
5555

56-
.PHONY: help build clean install-checkstyle install lint publish publish-dry release scan test
56+
.PHONY: help build clean coverage install-checkstyle install lint publish publish-dry release scan test

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# EasyVCR
22

33
[![CI](https://github.com/EasyPost/easyvcr-java/workflows/CI/badge.svg)](https://github.com/EasyPost/easyvcr-java/actions?query=workflow%3ACI)
4+
[![Coverage Status](https://coveralls.io/repos/github/EasyPost/easyvcr-java/badge.svg?branch=main)](https://coveralls.io/github/EasyPost/easyvcr-java?branch=main)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.easypost/easyvcr?label=Maven%20Central)](https://search.maven.org/artifact/com.easypost/easyvcr)
46

57
EasyVCR is a library for recording and replaying HTTP interactions in your test suite.
68

0 commit comments

Comments
 (0)