diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..15e33c3 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,13 @@ +name: CI build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build Docker image + run: docker build -t rapidrake-image . + - name: Run tests inside container + run: docker run rapidrake-image diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 434e200..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: java - -before_install: - - sudo apt-get update - - sudo apt-get install -y --no-install-recommends wget - - mkdir model-bin - - wget -P model-bin http://opennlp.sourceforge.net/models-1.5/en-sent.bin - - wget -P model-bin http://opennlp.sourceforge.net/models-1.5/en-pos-maxent.bin \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..42262c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu + +ADD . /home/rapidrake-java + +WORKDIR /home/rapidrake-java + +RUN apt-get update; \ + apt-get install -y --no-install-recommends openjdk-8-jdk maven wget; \ + update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; \ + mkdir model-bin; \ + wget -P model-bin http://opennlp.sourceforge.net/models-1.5/en-sent.bin; \ + wget -P model-bin http://opennlp.sourceforge.net/models-1.5/en-pos-maxent.bin + +ENTRYPOINT ["mvn", "test"] diff --git a/README.md b/README.md index f972c11..a579cd8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ rapidrake > A fast version of the Rapid Automatic Keyword Extraction (RAKE) algorithm -[![Linux Build Status](https://travis-ci.org/crew102/rapidrake-java.svg?branch=master)](https://travis-ci.org/crew102/rapidrake-java) +[![CI build](https://github.com/crew102/rapidrake-java/actions/workflows/ci-build.yml/badge.svg)](https://github.com/crew102/rapidrake-java/actions/workflows/ci-build.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.crew102/rapidrake/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.crew102/rapidrake) Installation