diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2391f2f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 9, 10, 11, 12] + steps: + - uses: actions/checkout@v2 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - run: ./gradlew test + - name: Gradle jacoco test report + run: ./gradlew jacocoTestReport + - name: Code coverage + uses: codecov/codecov-action@v1 diff --git a/.gitignore b/.gitignore index 4145818..e5d24a3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ # BlueJ files *.ctxt + # Mobile Tools for Java (J2ME) .mtj.tmp/ @@ -51,6 +52,12 @@ local.properties .project .classpath +# Intellij +.idea/ +*.iml +*.ipr +*.iws + # External tool builders .externalToolBuilders/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 51d530f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: java -dist: trusty - -before_install: - - chmod +x gradlew -before_script: -- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh - -jobs: - include: - - stage: jdk.java.net - OpenJDK - GPL - env: JDK=8 - script: - - jdk_switcher use openjdk8 - - ./gradlew clean - - ./gradlew test - - ./gradlew jacocoTestReport - - -after_success: -- bash <(curl -s https://codecov.io/bash) - -after_script: -- echo JAVA_HOME = ${JAVA_HOME} -- echo PATH = ${PATH} -- ls ${JAVA_HOME} -- java -version \ No newline at end of file diff --git a/README.md b/README.md index c9b9ba1..57dca2b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Trident -[![Build Status](https://api.travis-ci.org/ClubObsidian/trident.svg?branch=master)](https://travis-ci.org/ClubObsidian/trident) +[![build](https://github.com/ClubObsidian/wrappy/workflows/build/badge.svg)](https://github.com/ClubObsidian/trident/actions?query=workflow%3Atest) [![build artifacts](https://jitpack.io/v/clubobsidian/trident.svg)](https://jitpack.io/#clubobsidian/trident) [![codecov](https://codecov.io/gh/ClubObsidian/trident/branch/master/graph/badge.svg)](https://codecov.io/gh/ClubObsidian/trident) [![Known Vulnerabilities](https://snyk.io//test/github/ClubObsidian/trident/badge.svg?targetFile=build.gradle)](https://snyk.io//test/github/ClubObsidian/trident?targetFile=build.gradle) diff --git a/build.gradle b/build.gradle index eb2af46..ca83bf6 100644 --- a/build.gradle +++ b/build.gradle @@ -33,7 +33,7 @@ shadowJar { dependencies { testImplementation 'junit:junit:4.12' - compile 'org.javassist:javassist:3.25.0-GA' + compile 'org.javassist:javassist:3.27.0-GA' } jacocoTestReport { diff --git a/src/main/java/com/clubobsidian/trident/eventbus/javassist/JavassistEventBus.java b/src/main/java/com/clubobsidian/trident/eventbus/javassist/JavassistEventBus.java index 79efd43..3b5779c 100644 --- a/src/main/java/com/clubobsidian/trident/eventbus/javassist/JavassistEventBus.java +++ b/src/main/java/com/clubobsidian/trident/eventbus/javassist/JavassistEventBus.java @@ -21,8 +21,6 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; -import javax.xml.bind.Marshaller.Listener; - import com.clubobsidian.trident.Event; import com.clubobsidian.trident.EventBus; import com.clubobsidian.trident.MethodExecutor; @@ -58,7 +56,6 @@ public JavassistEventBus() private void setupPool() { this.addClassToPool(Event.class); - this.addClassToPool(Listener.class); } public ClassPool getClassPool()