SimpleMarkdown/.forgejo/workflows/pull_request.yml

73 lines
2.1 KiB
YAML
Raw Normal View History

2024-07-10 03:11:49 +00:00
name: Build & Test
on:
pull_request:
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
2024-09-24 02:02:47 +00:00
uses: https://git.wbrawner.com/gradle/actions/wrapper-validation@v4
2024-07-10 03:11:49 +00:00
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
2024-09-24 02:02:47 +00:00
uses: https://git.wbrawner.com/gradle/actions/setup-gradle@v4
- name: Run unit tests
run: ./gradlew check
2024-07-10 03:11:49 +00:00
- name: Publish JUnit Results
uses: actions/upload-artifact@v3
if: always()
with:
name: Unit Test Results
path: "*/build/reports/*"
if-no-files-found: error
ui_tests:
runs-on: ubuntu-latest
name: Run UI Tests
needs:
- unit_tests
2024-07-10 03:11:49 +00:00
steps:
2024-08-03 08:01:45 +00:00
- uses: actions/checkout@v4
2024-07-10 03:11:49 +00:00
- name: set up JDK
2024-08-03 08:01:54 +00:00
uses: https://git.wbrawner.com/actions/setup-java@v4
2024-07-10 03:11:49 +00:00
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: https://git.wbrawner.com/android-actions/setup-android@v3
2024-07-10 03:11:49 +00:00
- name: Build with Gradle
uses: https://git.wbrawner.com/gradle/gradle-build-action@v2
with:
arguments: assemblePlayDebug assemblePlayDebugAndroidTest
- 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