Add GH actions (#386)
This commit is contained in:
parent
d2c32b51ac
commit
65871700bc
|
@ -0,0 +1,125 @@
|
|||
name: Build
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
# Cache
|
||||
- name: Cache .gradle/caches
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-cache-
|
||||
- name: Cache .gradle/wrapper
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-wrapper-
|
||||
# Licensing
|
||||
- name: Licensing
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain -S license
|
||||
# Coding style
|
||||
- name: Coding style
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain -i codenarcMain codenarcTest codenarcIntTest
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
# use a short path to avoid exceeding the path limit on Windows... sigh
|
||||
with:
|
||||
path: 'w'
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
# Cache
|
||||
- name: Cache .gradle/caches
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-cache-
|
||||
- name: Cache .gradle/wrapper
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-wrapper-
|
||||
# Build
|
||||
- name: Build
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all -clean assemble
|
||||
# Test
|
||||
- name: UnitTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all --no-parallel test
|
||||
# Test
|
||||
- name: IntegrationTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all --no-parallel intTest
|
||||
# Test
|
||||
- name: CompatibilityTest
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --console=plain --warning-mode=all --no-parallel gradleTest
|
||||
# Stop gradlew to avoid locking issues
|
||||
- name: Cleanup
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: --stop
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
java: [ 8, 11 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
# Cache
|
||||
- name: Cache .gradle/caches
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-cache-
|
||||
- name: Cache .gradle/wrapper
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-wrapper-
|
||||
# Build
|
||||
- name: Build
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -S --console=plain --no-build-cache assemble
|
||||
# Unit tests
|
||||
- name: UNit tests
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -s --console=plain --no-build-cache test
|
||||
# Integration tests
|
||||
- name: Integration tests (without slides)
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -s --console=plain --no-build-cache intTest
|
||||
# Gradle tests
|
||||
- name: Gradle tests
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
with:
|
||||
arguments: -i -s --console=plain --no-build-cache gradleTest
|
|
@ -0,0 +1,3 @@
|
|||
# Enable auto-env through the sdkman_auto_env config
|
||||
# Add key=value pairs of SDKs to use below
|
||||
java=8.0.265.j9-adpt
|
14
.travis.yml
14
.travis.yml
|
@ -1,14 +0,0 @@
|
|||
language: java
|
||||
sudo: true
|
||||
#env:
|
||||
# - GRADLE_OPTS="-Xmx768m -Xms256m -Xss1m"
|
||||
script:
|
||||
- ./gradlew -S -i --max-workers=2 --no-daemon clean check build --scan
|
||||
jdk:
|
||||
- openjdk8
|
||||
- openjdk11
|
||||
os:
|
||||
- linux
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle
|
24
appveyor.yml
24
appveyor.yml
|
@ -1,24 +0,0 @@
|
|||
version: "{branch} {build}"
|
||||
|
||||
build:
|
||||
verbosity: detailed
|
||||
|
||||
build_script:
|
||||
- gradlew.bat assemble --info --no-daemon --scan
|
||||
|
||||
test_script:
|
||||
- gradlew.bat test check gradleTest --info --no-daemon --scan
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- development
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
|
||||
- JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
|
||||
|
||||
|
||||
cache:
|
||||
- C:\Users\appveyor\.gradle
|
|
@ -1,4 +1,4 @@
|
|||
version=2.1.0-alpha.2
|
||||
version=2.1.0-alpha.3
|
||||
group=com.github.jruby-gradle
|
||||
copyrightYear=2014-2020
|
||||
|
||||
|
|
Loading…
Reference in New Issue