Skip to content

Commit

Permalink
Merge pull request #54 from Backbase/ci-enhancements
Browse files Browse the repository at this point in the history
CI enhancements
  • Loading branch information
fnxpt authored Feb 19, 2021
2 parents 2a1c4e5 + fc88be3 commit 543cf7e
Show file tree
Hide file tree
Showing 6 changed files with 727 additions and 18 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
uses: gradle/wrapper-validation-action@v1
- name: Build
run: ./gradlew clean build --stacktrace
- name: Report Detekt results
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ${{ github.workspace }}/build/detekt/sarif
checkout_path: ${{ github.workspace }}
- name: Instrumented tests
uses: reactivecircus/android-emulator-runner@v2.14.3
with:
Expand All @@ -33,3 +38,20 @@ jobs:
check_name: Android test report for API ${{ matrix.api-level }}
github_token: ${{ secrets.GITHUB_TOKEN }}
report_paths: "**/build/outputs/androidTest-results/connected/flavors/debugAndroidTest/TEST-*.xml"

scan_for_secrets:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
# Allows Gitleaks to scan the commit history of a whole PR:
fetch-depth: '0'
- name: Fetch Gitleaks rules
uses: wei/wget@v1
with:
args: -O .rules.toml https://raw.githubusercontent.com/fnxpt/gitleaks-action/rules/.rules.toml
- name: Gitleaks
uses: zricethezav/gitleaks-action@v1.3.0
with:
config-path: .rules.toml
17 changes: 0 additions & 17 deletions .github/workflows/secrets.yml

This file was deleted.

2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ buildscript {
classpath 'org.jetbrains.kotlinx:binary-compatibility-validator:0.3.0'

classpath 'dev.drewhamilton.extracare:extracare-gradle-plugin:0.5.0'

classpath 'io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.15.0'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public interface DeferredTypeface {
override fun resolve(context: Context, fontCallback: ResourcesCompat.FontCallback, handler: Handler?) {
val value = try {
resolve(context)
} catch (runtimeException: RuntimeException) {
} catch (@Suppress("Detekt.TooGenericExceptionCaught") runtimeException: RuntimeException) {
// Generic RuntimeException is thrown by Typeface.createFromAsset. We use that to call
// `fontCallback.onFontRetrievalFailed(FAIL_REASON_FONT_NOT_FOUND)` below
null
}

Expand Down
Loading

0 comments on commit 543cf7e

Please sign in to comment.