Build and Test app module #8
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
name: Build and Test app module | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- app/** | |
workflow_dispatch: | |
jobs: | |
java_version: | |
name: Use Java | |
runs-on: ubuntu-latest | |
# Runs only when commit message startsWith 'Update' | |
# if: startsWith(github.event.head_commit.message, 'Update') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Must be used to trigger workflow after push | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
# Print Hello, world! | |
- name: Run a one-line script | |
run: echo Hello, world! | |
# Print Java compiler version | |
- name: Print Java | |
run: javac -version | |
- name: Run Debug Tests | |
run: ./gradlew :app:testDebugUnitTest |