Play store policy updates #324
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CICD | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
env: | |
# Release tag associated with version of Detekt to be installed | |
# SARIF support (required for this workflow) was introduced in Detekt v1.15.0 | |
DETEKT_RELEASE_TAG: v1.15.0 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build debug app | |
env: | |
VERSION_CODE: ${{ github.run_number }} | |
run: ./gradlew assembleDebug --info | |
- name: upload debug apk | |
uses: actions/upload-artifact@v2 | |
with: | |
name: debug.apk | |
path: app/build/outputs/apk/debug/SafeBox-debug.apk | |
- name: Run lint | |
run: ./gradlew lint | |
- name: upload html lint report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lint.html | |
path: app/build/reports/lint-results-debug.html | |
- name: Run ktlint | |
run: ./gradlew app:ktlintCheck --daemon | |
- name: Build QA apk | |
env: | |
VERSION_CODE: ${{ github.run_number }} | |
run: ./gradlew assembleQa --info | |
- name: upload QA apk | |
uses: actions/upload-artifact@v2 | |
with: | |
name: qa.apk | |
path: app/build/outputs/apk/qa/SafeBox-qa.apk | |
# unit-test: | |
# needs: [ build ] | |
# runs-on: ubuntu-latest | |
# | |
# steps: | |
# - uses: actions/checkout@v2 | |
# | |
# - name: Make gradlew executable | |
# run: chmod +x ./gradlew | |
# | |
# - name: Run Unit test | |
# run: ./gradlew test | |
# | |
# - name: upload test result | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: Unit test result | |
# path: app/build/reports/tests/testDebugUnitTest/ | |
# instrumentation-test: | |
# needs: [ unit-test ] | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Make gradlew executable | |
# run: chmod +x ./gradlew | |
# - name: Run espresso test | |
# uses: reactivecircus/android-emulator-runner@v2 | |
# with: | |
# api-level: 29 | |
# script: ./gradlew connectedCheck | |
# - name: upload test result | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: Instrumentation test result | |
# path: app/build/reports/androidTests/connected/ | |
Detekt: | |
name: Detekt Scan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Run Detekt | |
continue-on-error: true | |
run: ./gradlew detekt | |
- uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: app/build/reports/detekt/detekt.sarif | |
checkout_path: ${{ github.workspace }} | |
- name: upload detekt html report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: detektReport.html | |
path: app/build/reports/detekt/detekt.html |