Skip to content

Workflow Fixes & Add Manual Workflow #1

Workflow Fixes & Add Manual Workflow

Workflow Fixes & Add Manual Workflow #1

#Workflow name
name: Run Unit Test on PR creation
#Generating triggers: It only triggers when pull request is generated on any branch.
on: [pull_request]
#Generating jobs: Execute job when trigger is hit.
jobs:
#Run test cases
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Grant Permission to Execute
run: chmod +x gradlew
# Cache gradle steps to validate all test
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: cache-${{ runner.os }}-${{ matrix.jdk }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Run Test Cases
run: bash ./gradlew test --stacktrace