Skip to content

Create workflow to run unit tests #4

Create workflow to run unit tests

Create workflow to run unit tests #4

Workflow file for this run

name: Unit Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
- name: Run unit tests
run: ./gradlew test