Add pull request workflow
Some checks failed
Build & Test / Validate (push) Successful in 23s
Build & Test / Run Unit Tests (push) Failing after 6m59s

This commit is contained in:
William Brawner 2024-11-16 16:47:42 -07:00
parent 4bf56a5918
commit f2d5687a5f
Signed by: wbrawner
GPG key ID: 8FF12381C6C90D35

View file

@ -0,0 +1,74 @@
name: Build & Test
on:
pull_request:
push:
branches: [ main ]
jobs:
validate:
runs-on: ubuntu-latest
name: Validate
steps:
- uses: actions/checkout@v4
- name: set up JDK
uses: https://git.wbrawner.com/actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Validate Gradle Wrapper
uses: https://git.wbrawner.com/gradle/actions/wrapper-validation@v4
unit_tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs:
- validate
steps:
- uses: actions/checkout@v4
- name: set up JDK
uses: https://git.wbrawner.com/actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: https://git.wbrawner.com/android-actions/setup-android@v3
- name: Setup Gradle
uses: https://git.wbrawner.com/gradle/actions/setup-gradle@v4
- name: Run checks
run: ./gradlew check
# TODO: Uncomment the following once I get unit tests written
# - name: Publish JUnit Results
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: Unit Test Results
# path: "*/build/reports/*"
# if-no-files-found: error
# TODO: Uncomment the following once I get UI tests written
# ui_tests:
# runs-on: ubuntu-latest
# name: Run UI Tests
# needs:
# - validate
# steps:
# - uses: actions/checkout@v2
# - name: set up JDK
# uses: https://git.wbrawner.com/actions/setup-java@v3
# with:
# distribution: 'zulu'
# java-version: '17'
# - name: Build with Gradle
# uses: https://git.wbrawner.com/gradle/gradle-build-action@v2
# with:
# arguments: assembleDebug assembleDebugAndroidTest
# - name: Grant execute permission for flank_auth.sh
# run: chmod +x flank_auth.sh
# - name: Add auth for flank
# env:
# GCLOUD_KEY: ${{ secrets.GCLOUD_KEY }}
# run: |
# ./flank_auth.sh
# - name: Run UI tests
# uses: https://git.wbrawner.com/gradle/gradle-build-action@v2
# with:
# arguments: runFlank