Skip to content

Commit

Permalink
Update code coverage report configuration
Browse files Browse the repository at this point in the history
- It only upload report master and develop branch.
  • Loading branch information
hayarobi committed Sep 4, 2023
1 parent b92a764 commit bc8d8b0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,40 @@
name: Java CI with Gradle

on:
workflow_dispatch:
push:
branches: [ "develop" ]
workflow_dispatch:
push:
branches: [ "master", "develop"]

permissions:
contents: read
contents: read

jobs:
build:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'

runs-on: ubuntu-latest
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build allcoverage

# run unit test with code coverage report if action is triggered by push of master branch
# since Code Climate only evaluate code coverages of default branch.
- name: Unit Tests with publishing code coverage
uses: codecov/codecov-action@v3
with:
files: ${{github.workspace}}/build/reports/jacoco/report.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![LoC](https://tokei.rs/b1/github/aergoio/heraj)](https://github.com/aergoio/heraj)
[![Travis_ci](https://travis-ci.org/aergoio/heraj.svg?branch=develop)](https://travis-ci.org/aergoio/heraj)
[![github build](https://github.com/aergoio/aergo/actions/workflows/gradle.yml/badge.svg)](https://github.com/aergoio/aergo/actions/workflows/gradle.yml/badge.svg)
[![codecov.io](http://codecov.io/github/aergoio/heraj/coverage.svg?branch=develop)](http://codecov.io/github/aergoio/heraj?branch=develop)

The hera is the client-side framework for the aergo.
Expand Down

0 comments on commit bc8d8b0

Please sign in to comment.