Skip to content

Commit

Permalink
Migrate CI to Github Actions and enable coverage report (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveYurongSu authored May 26, 2021
1 parent 11d149c commit cf35627
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 48 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

30 changes: 14 additions & 16 deletions .github/workflows/codeql-analysis.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,21 @@
# specific language governing permissions and limitations
# under the License.

name: "CodeQL"
name: "Continuous Integration"

on:
push:
branches:
- develop
paths-ignore:
- 'docs/**'
pull_request:
branches:
- develop
paths-ignore:
- 'docs/**'
schedule:
- cron: '30 5 * * *'
workflow_dispatch:

jobs:
analyze:
name: Analyze
build:
name: Build

runs-on: ubuntu-latest

strategy:
Expand All @@ -49,11 +44,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
Expand All @@ -63,8 +53,16 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main
languages: ${{ matrix.language }}

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Build
run: ./gradlew clean build
run: ./gradlew clean build jacocoTestReport

- name: Perform CodeQL Analysis
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v1

- name: Upload coverage report to codecov.io
run: bash <(curl -s https://codecov.io/bash) || echo 'Failed to upload coverage report!'
1 change: 1 addition & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on: [pull_request, issues]

jobs:
greeting:
name: Greeting
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
Expand Down
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Apache EventMesh (incubating)
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)
[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases)
Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Apache EventMesh (Incubating)
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)
[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases)
Expand Down
19 changes: 3 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ buildscript {
maven {
url "https://plugins.gradle.org/m2/"
}

}

dependencies {
Expand Down Expand Up @@ -63,7 +62,6 @@ allprojects {

compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"


clean.doFirst {
delete 'build'
delete 'dist'
Expand All @@ -73,7 +71,6 @@ allprojects {
if ((project.findProperty("snapshot") instanceof String) && (Boolean.valueOf(project.property("snapshot")))) {
version = version + "-SNAPSHOT"
}

}

task tar(type: Tar) {
Expand All @@ -96,7 +93,6 @@ task zip(type: Zip) {
}
}


subprojects {

List fastjson = [
Expand Down Expand Up @@ -142,7 +138,6 @@ subprojects {
"com.lmax:disruptor:3.4.2"
]


List common = [
"commons-io:commons-io:2.4",
"org.apache.commons:commons-text:1.9"
Expand All @@ -165,7 +160,6 @@ subprojects {
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.7'
}


sourceSets {
main {
java.srcDirs = ['src/main/java']
Expand All @@ -183,17 +177,13 @@ subprojects {

jacoco {
toolVersion = "0.8.6"
reportsDir = file("$buildDir/reports/jacoco")
}

jacocoTestReport {
// sourceSets sourceSets.main
// executionData files("$buildDir/jacoco/jacocoTest.exec")

reports {
xml.enabled false
xml.enabled true
csv.enabled false
html.destination file("${buildDir}/reports/jacoco/html")
html.enabled false
}
}

Expand All @@ -211,7 +201,7 @@ subprojects {
// html.enabled true
// }
// }

//
// sourceSets {
// main {
// java {
Expand All @@ -234,11 +224,8 @@ subprojects {
// }
//
// }
//
//
// }


spotbugs {
//toolVersion = '4.2.3'
ignoreFailures = true
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Apache EventMesh (Incubating)
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)
[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases)
Expand Down
1 change: 1 addition & 0 deletions docs/cn/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Apache EventMesh (Incubating)
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)
[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases)
Expand Down
1 change: 1 addition & 0 deletions docs/en/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Apache EventMesh (Incubating)
[![Build Status](https://www.travis-ci.org/apache/incubator-eventmesh.svg?branch=develop)](https://www.travis-ci.org/github/apache/incubator-eventmesh.svg?branch=develop)
[![CodeCov](https://codecov.io/gh/apache/incubator-eventmesh/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-eventmesh)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/context:java)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)
[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases)
Expand Down

0 comments on commit cf35627

Please sign in to comment.