Workflow Fixes & Add Manual Workflow #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |