2021-02-18 17:02:52 +00:00
|
|
|
name: Android build PR
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
|
|
run-build:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-02-24 14:12:30 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
2021-02-18 17:02:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-05-26 09:45:30 +00:00
|
|
|
java-version: 11
|
2021-02-18 17:02:52 +00:00
|
|
|
- name: "Clean & Assemble Debug"
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: clean app:assembleDebug
|
|
|
|
|
|
|
|
run-testDebugUnitTest:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-02-24 14:12:30 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
|
|
|
|
2021-02-18 17:02:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-05-26 09:45:30 +00:00
|
|
|
java-version: 11
|
2021-02-18 17:02:52 +00:00
|
|
|
- name: "Test Debug Unit Tests"
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: testDebugUnitTest
|
|
|
|
|
|
|
|
run-detekt:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-02-24 14:12:30 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
|
|
|
|
2021-02-18 17:02:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-05-26 09:45:30 +00:00
|
|
|
java-version: 11
|
2021-02-18 17:02:52 +00:00
|
|
|
- name: "Detekt"
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: detekt
|
|
|
|
- name: Archive detekt results
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: detekt report
|
|
|
|
path: build/reports/detekt.html
|
|
|
|
|
|
|
|
run-ktlint:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-02-24 14:12:30 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
|
|
|
|
2021-02-18 17:02:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-05-26 09:45:30 +00:00
|
|
|
java-version: 11
|
2021-02-18 17:02:52 +00:00
|
|
|
- name: "Ktlint"
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: ktlint
|
|
|
|
|
|
|
|
run-lintDebug:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-02-24 14:12:30 +00:00
|
|
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
|
|
|
|
2021-02-18 17:02:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
2021-05-26 09:45:30 +00:00
|
|
|
java-version: 11
|
2021-02-18 17:02:52 +00:00
|
|
|
- name: "Lint Debug"
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: lintDebug
|
|
|
|
- name: Archive lint results
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: lintDebug report
|
|
|
|
path: app/build/reports/lint-results-debug.html
|
|
|
|
|
2021-04-21 14:20:34 +00:00
|
|
|
run-ui:
|
2021-07-05 23:38:05 +00:00
|
|
|
runs-on: macos-11
|
2021-12-06 18:12:55 +00:00
|
|
|
if: ${{ false }}
|
2021-04-21 14:20:34 +00:00
|
|
|
|
|
|
|
timeout-minutes: 60
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
api-level: [28]
|
|
|
|
target: [google_apis]
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run subset of UI Tests
|
2021-12-02 02:19:09 +00:00
|
|
|
uses: reactivecircus/android-emulator-runner@v2.21.0
|
2021-04-21 14:20:34 +00:00
|
|
|
with:
|
|
|
|
api-level: ${{ matrix.api-level }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
arch: x86_64
|
2021-12-02 02:19:09 +00:00
|
|
|
profile: pixel_2
|
2021-04-21 14:20:34 +00:00
|
|
|
script:
|
2021-07-26 09:41:32 +00:00
|
|
|
"JAVA_HOME=$JAVA_HOME_11_X64 && ./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=\
|
2021-04-21 14:20:34 +00:00
|
|
|
org.mozilla.fenix.ui.NavigationToolbarTest#visitURLTest"
|
|
|
|
- name: Upload Test Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: test-report
|
|
|
|
path: app/build/reports
|