Skip to content

Merge pull request #6 from MackHartley/MackHartley-patch-2 #34

Merge pull request #6 from MackHartley/MackHartley-patch-2

Merge pull request #6 from MackHartley/MackHartley-patch-2 #34

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run_tests:
runs-on: macos-latest
# Workflow steps
steps:
# Cancel any previously started (but currently unfinished) workflows
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
# Check out repo (under $GITHUB_WORKSPACE) so the job can access it
- uses: actions/checkout@v2
# Set up JDK
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# Cache
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Verify project can build and basic junit unit tests pass
- name: Build With Gradle and Run Unit Tests
run: ./gradlew build
# Clean up cache
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties