From 9807ba18f079eabb6a608c5bac5e495fd985f3bf Mon Sep 17 00:00:00 2001 From: himadieievsv Date: Tue, 21 Jul 2020 14:14:22 +0900 Subject: [PATCH 1/4] add github actions instructions --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1d0ddaa --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +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 + + - uses: actions/upload-artifact@v2 + if: always() + with: + name: tests + path: ./build/reports/tests/test + + - name: JaCoCo test report + if: success() + run: ./gradlew jacocoTestReport + + - uses: actions/upload-artifact@v2 + if: success() + with: + name: jacoco + path: ./build/reports/jacoco/test From 6ab0b056c4e6bc65f1443c0aa096203082f2985b Mon Sep 17 00:00:00 2001 From: himadieievsv Date: Tue, 21 Jul 2020 14:15:51 +0900 Subject: [PATCH 2/4] remove Travis CI --- .travis.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .travis.yml 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 From 6f99681c2a155b9ea4d8ae4aa791de5e0b74acda Mon Sep 17 00:00:00 2001 From: himadieievsv Date: Tue, 21 Jul 2020 15:19:05 +0900 Subject: [PATCH 3/4] upload jem and jar artifacts --- .github/workflows/build.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d0ddaa..7324004 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,18 +30,28 @@ jobs: - name: Check building run: ./gradlew gem --console rich --info - - uses: actions/upload-artifact@v2 - if: always() - with: - name: tests - path: ./build/reports/tests/test - - 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: jacoco - path: ./build/reports/jacoco/test + 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 From 2cfb5a5b930e97eb82e53e9bcf6b1f20edcf6554 Mon Sep 17 00:00:00 2001 From: himadieievsv Date: Tue, 21 Jul 2020 15:20:19 +0900 Subject: [PATCH 4/4] fix workflow syntax --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7324004..6c38f09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,13 +45,13 @@ jobs: path: ./reports.zip - uses: actions/upload-artifact@v2 - if: success() - with: - name: gem - path: ./pkg/*.gem + if: success() + with: + name: gem + path: ./pkg/*.gem - uses: actions/upload-artifact@v2 - if: success() - with: - name: jar - path: ./build/libs/*.jar + if: success() + with: + name: jar + path: ./build/libs/*.jar