Update workflow to run unit and UI tests in parallel and execute on pull requests in addition to the main branch
This commit is contained in:
parent
80e323b326
commit
f542e10264
1 changed files with 25 additions and 7 deletions
32
.github/workflows/android.yml
vendored
32
.github/workflows/android.yml
vendored
|
@ -1,14 +1,14 @@
|
||||||
name: Android CI
|
name: Android CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: set up JDK
|
- name: set up JDK
|
||||||
|
@ -16,12 +16,28 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Grant execute permission for gradlew
|
- name: Validate Gradle Wrapper
|
||||||
run: chmod +x gradlew
|
uses: gradle/wrapper-validation-action@v1
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew assemblePlayDebug assemblePlayDebugAndroidTest
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: assemblePlayDebug assemblePlayDebugAndroidTest
|
||||||
|
unit_test:
|
||||||
|
name: Run Unit Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
steps:
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ./gradlew testPlayDebugUnitTest
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: testPlayDebugUnitTest
|
||||||
|
ui_tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Run UI Tests
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
steps:
|
||||||
- name: Grant execute permission for flank_auth.sh
|
- name: Grant execute permission for flank_auth.sh
|
||||||
run: chmod +x flank_auth.sh
|
run: chmod +x flank_auth.sh
|
||||||
- name: Add auth for flank
|
- name: Add auth for flank
|
||||||
|
@ -30,4 +46,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
./flank_auth.sh
|
./flank_auth.sh
|
||||||
- name: Run UI tests
|
- name: Run UI tests
|
||||||
run: ./gradlew runFlank
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: runFlank
|
||||||
|
|
Loading…
Reference in a new issue