Plex-FAWE/.github/workflows/gradle.yml

54 lines
1.4 KiB
YAML
Raw Normal View History

2019-11-06 16:45:41 +00:00
name: Java CI
on:
push:
branches:
2020-09-19 14:59:58 +00:00
- 'main'
2019-11-06 16:45:41 +00:00
pull_request:
branches:
2020-09-19 14:59:58 +00:00
- 'main'
2019-11-06 16:45:41 +00:00
jobs:
test:
2020-09-02 17:40:24 +00:00
runs-on: ubuntu-latest
2019-11-06 16:45:41 +00:00
steps:
2020-03-20 00:12:21 +00:00
- name: Checkout
2020-09-02 17:41:37 +00:00
uses: actions/checkout@v2.3.2
2020-03-20 00:12:21 +00:00
- name: Setup Java JDK
2020-09-02 17:40:24 +00:00
uses: actions/setup-java@v1.4.2
2019-11-06 16:45:41 +00:00
with:
java-version: 1.8
2020-09-02 17:40:24 +00:00
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache BuildTools decompiled code
uses: actions/cache@v2
with:
path: $GITHUB_WORKSPACE/work
key: ${{ runner.os }}-buildtools
restore-keys: |
${{ runner.os }}-buildtools
2020-09-02 17:40:24 +00:00
- name: Test enviornment
run: echo $GITHUB_WORKSPACE
2020-03-19 22:45:24 +00:00
- name: Download BuildTools
run: wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
2020-03-19 22:47:48 +00:00
- name: Run BuildTools
2020-09-07 18:49:05 +00:00
run: java -jar BuildTools.jar --rev 1.16.2
2019-11-06 16:45:41 +00:00
- name: Test with Gradle
2020-09-07 18:49:05 +00:00
run: ./gradlew clean build sourcesJar javadocJar
2020-03-19 22:45:24 +00:00