2024-06-20 23:49:04 +00:00
|
|
|
name: Build & Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
validate:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: 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: Validate Gradle Wrapper
|
2024-06-20 22:01:19 +00:00
|
|
|
uses: https://git.wbrawner.com/gradle/wrapper-validation-action@v1
|
2024-06-20 23:49:04 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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: Run unit tests
|
2024-06-20 22:01:19 +00:00
|
|
|
uses: https://git.wbrawner.com/gradle/gradle-build-action@v2
|
2024-06-20 23:49:04 +00:00
|
|
|
with:
|
2024-06-20 22:01:19 +00:00
|
|
|
arguments: testDebugUnitTest
|
2024-06-20 23:49:04 +00:00
|
|
|
- name: Publish JUnit Results
|
2024-07-02 02:56:04 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-06-20 23:49:04 +00:00
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: Unit Test Results
|
|
|
|
path: "*/build/test-results/*/*.xml"
|
2024-07-02 02:56:04 +00:00
|
|
|
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
|