Skip to content

Commit

Permalink
Migrate CI to Github Actions and enable coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveYurongSu committed May 24, 2021
1 parent d599eea commit 35ef449
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 34 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!'
2 changes: 1 addition & 1 deletion .github/workflows/gitee-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.EVENTMESH }}
BRANCH: gh-pages
FOLDER: docs/.vuepress/dist # The folder the action should deploy.
FOLDER: docs/.vuepress/dist # The folder the action should deploy.
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
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

0 comments on commit 35ef449

Please sign in to comment.