From 458c1c67a5105f254e32c8cc6a927a26acd5c390 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 18 Aug 2020 00:32:11 -0700 Subject: [PATCH] Added GitLab, BitBucket and GitHub CI configurations. --- .github/workflows/gradle.yml | 21 +++++++++++++++++++++ .gitlab-ci.yml | 31 +++++++++++++++++++++++++++++++ bitbucket-pipelines.yml | 9 +++++++++ 3 files changed, 61 insertions(+) create mode 100644 .github/workflows/gradle.yml create mode 100644 .gitlab-ci.yml create mode 100644 bitbucket-pipelines.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..2801719 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,21 @@ +name: Java CI with Gradle + +on: [push, pull_request, workflow_dispatch] + +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: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Test with Gradle + run: ./gradlew check + env: + AKISMET_BLOG: ${{ secrets.AKISMET_BLOG }} + AKISMET_API_KEY: ${{ secrets.AKISMET_API_KEY }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..26820aa --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,31 @@ +image: gradle:alpine + +variables: + GRADLE_OPTS: "-Dorg.gradle.daemon=false" + +before_script: + - export GRADLE_USER_HOME=`pwd`/.gradle + +stages: + - build + - test + +build: + stage: build + script: ./gradlew --build-cache assemble + cache: + key: "$CI_COMMIT_REF_NAME" + policy: push + paths: + - build + - .gradle + +test: + stage: test + script: ./gradlew check + cache: + key: "$CI_COMMIT_REF_NAME" + policy: pull + paths: + - build + - .gradle diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 0000000..7d98402 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,9 @@ +image: openjdk:8 + +pipelines: + default: + - step: + caches: + - gradle + script: + - bash ./gradlew check