Create build_and_test.yml
This commit is contained in:
parent
cdfc11344d
commit
c26a49b56f
1 changed files with 30 additions and 0 deletions
30
.github/workflows/build_and_test.yml
vendored
Normal file
30
.github/workflows/build_and_test.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This workflow will build the project and test it
|
||||
|
||||
name: Build and Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
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: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Test with Gradle
|
||||
run: ./gradlew test
|
Reference in a new issue