diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6c38f09 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: Build and test + +on: push + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Run elastisearch container + run: docker-compose up -d + + - name: List containers + run: docker-compose ps + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Testing + run: ./gradlew check --console rich --info + + - name: Check building + run: ./gradlew gem --console rich --info + + - name: JaCoCo test report + if: success() + run: ./gradlew jacocoTestReport + + - name: Pack reports + if: always() + run: zip -9 -r -q reports.zip ./build/reports + + - uses: actions/upload-artifact@v2 + if: success() + with: + name: reports + path: ./reports.zip + + - uses: actions/upload-artifact@v2 + if: success() + with: + name: gem + path: ./pkg/*.gem + + - uses: actions/upload-artifact@v2 + if: success() + with: + name: jar + path: ./build/libs/*.jar diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ff47de7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: java - -jdk: - - openjdk8 - -services: - - docker - -before_script: - - docker-compose up -d - - docker-compose ps - -script: - - ./gradlew gem - - ./gradlew --info check jacocoTestReport