From e69e04c5c0d66f66ced901974f848fd85d1a1b87 Mon Sep 17 00:00:00 2001 From: Emil Koutanov Date: Sat, 23 Jul 2022 10:21:03 +1000 Subject: [PATCH] Upgraded Gradle -> 7.5 and added GitHub Actions --- .github/workflows/master.yml | 19 +++++++++++++++++++ .github/workflows/pull_request.yml | 16 ++++++++++++++++ .lgtm.yml | 2 +- .travis.yml | 13 ------------- build.gradle | 20 ++++++++++++-------- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/master.yml create mode 100644 .github/workflows/pull_request.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 00000000..e99fbf77 --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,19 @@ +name: Gradle build + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '11' + - run: ./gradlew build + - run: curl -Os https://uploader.codecov.io/latest/linux/codecov + - run: chmod +x codecov + - run: ./codecov \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 00000000..339be908 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,16 @@ +name: Check pull request + +on: + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '11' + - run: ./gradlew build \ No newline at end of file diff --git a/.lgtm.yml b/.lgtm.yml index 20bcdea4..2baa113d 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,7 +1,7 @@ extraction: java: index: - java_version: "9" + java_version: "16" queries: - include: "*" - exclude: java/uncaught-number-format-exception diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f798c04d..00000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: java -os: - - linux -services: - - docker -jdk: - - openjdk11 -install: - - travis_retry ./gradlew --info dependencies --refresh-dependencies -script: - - ./gradlew build javadocJar --stacktrace --info -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/build.gradle b/build.gradle index c6b9c10f..16a129de 100644 --- a/build.gradle +++ b/build.gradle @@ -127,9 +127,9 @@ jacoco { jacocoTestReport { dependsOn test reports { - html.enabled true - xml.enabled true - csv.enabled false + html.required = true + xml.required = true + csv.required = false } } @@ -152,6 +152,15 @@ dependencies { testImplementation "com.obsidiandynamics.pojotester:core:${pojotesterVersion}" } +jar { + finalizedBy jacocoTestReport +} + +test { + include "com/obsidiandynamics/indigo/CycledPrimaryTests.class" + include "com/obsidiandynamics/indigo/SupportingTests.class" +} + publishing { publications { mavenJava(MavenPublication) { @@ -182,9 +191,4 @@ publishing { } } } -} - -test { - include "com/obsidiandynamics/indigo/CycledPrimaryTests.class" - include "com/obsidiandynamics/indigo/SupportingTests.class" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fce..8049c684 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists