Skip to content

Commit

Permalink
Pull request #248: RUM-8734 Working Github actions
Browse files Browse the repository at this point in the history
Merge in OP/openkit-java from feature/RUM-8734-transition-open-kit-java-from-travis-ci-to-github-actions to main

* commit 'e5742eced47122ff34248fd7a9d88f115dc04ec3':
  RUM-8734 Working Github actions

GitOrigin-RevId: e442351ce15cbe5300534b24f7e18e4ad9426bf2
  • Loading branch information
TheHighriser authored and openkitdt committed Jan 11, 2023
1 parent ad3135b commit 4bdbd75
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '8', '11' ]
name: Java ${{ matrix.Java }} Build

steps:
Expand Down Expand Up @@ -42,4 +42,4 @@ jobs:
- name: Code Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: ./gradlew jacocoTestReport coverallsJacoco
run: ./gradlew test jacocoTestReport coverallsJacoco
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![Build Status](https://github.com/Dynatrace/openkit-java/actions/workflows/build.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/Dynatrace/openkit-java/badge.svg)](https://coveralls.io/github/Dynatrace/openkit-java)
[![Coverage Status](https://coveralls.io/repos/github/Dynatrace/openkit-java/badge.svg?branch=main)](https://coveralls.io/github/Dynatrace/openkit-java?branch=main)

:information_source: We changed the default branch name to `main`. You can find the necessary steps to update your local clone on [Scott Hanselman's Blog](https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx).
We encourage you to rename the default branch in your forks too.
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ task javadocJar(type: Jar) {
from javadoc
}

apply from: "gradle/coverage.gradle"
apply from: "gradle/publish.gradle"

// run each test for every JAVA_HOME_* environment which is specified and set as environment
Expand Down
42 changes: 42 additions & 0 deletions gradle/coverage.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Copyright 2023 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

def coverageReportDir = file("$buildDir/reports/coverage/jacoco")

jacoco {
toolVersion = "0.8.2"
reportsDir = coverageReportDir
}

def coverageXmlReportFile = file("${coverageReportDir}/jacocoReport.xml")

jacocoTestReport {
reports {
xml.enabled = true
xml.destination = coverageXmlReportFile
html.enabled = true
html.destination = file("${coverageReportDir}/html")
}
}

coverallsJacoco {
reportPath = coverageXmlReportFile.toString()
}

tasks.coverallsJacoco {
dependsOn 'check'
onlyIf { System.env.'CI' }
}

0 comments on commit 4bdbd75

Please sign in to comment.