Added more CIs
This commit is contained in:
parent
1a80f6ab89
commit
6813a882b5
3 changed files with 58 additions and 0 deletions
18
.github/workflows/gradle.yml
vendored
Normal file
18
.github/workflows/gradle.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
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 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Test with Gradle
|
||||
run: ./gradlew check
|
31
.gitlab-ci.yml
Normal file
31
.gitlab-ci.yml
Normal file
|
@ -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
|
9
bitbucket-pipelines.yml
Normal file
9
bitbucket-pipelines.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
image: openjdk:11
|
||||
|
||||
pipelines:
|
||||
default:
|
||||
- step:
|
||||
caches:
|
||||
- gradle
|
||||
script:
|
||||
- bash ./gradlew check
|
Loading…
Add table
Add a link
Reference in a new issue