Bump dagger from 2.55 to 2.56 #720
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: "Commit" | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- main | |
permissions: | |
checks: write | |
security-events: write | |
pull-requests: write | |
jobs: | |
unit-tests: | |
name: "Unit Tests" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: "testDebugUnitTest" | |
reuse-configuration-cache: true | |
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
spotless: | |
name: "Spotless Check" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: "spotlessCheck" | |
# Due to https://github.com/diffplug/spotless/issues/987 | |
reuse-configuration-cache: false | |
validate-xml: | |
name: "Validate XML" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- name: "Run XMLStarlet" | |
shell: "bash" | |
run: | | |
sudo apt-get update | |
sudo apt-get install xmlstarlet | |
ci/validate_xml.sh | |
validate-shell-scripts: | |
name: "Validate Shell Scripts" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- name: "Run ShellCheck" | |
shell: "bash" | |
run: | | |
ci/validate_shell_scripts.sh | |
module-graph: | |
name: "Module Graph Check" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: "assertModuleGraph" | |
reuse-configuration-cache: false | |
android-lint-default: | |
name: "Android Lint Default" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease" | |
reuse-configuration-cache: false | |
android-lint-accessibility: | |
name: "Android Lint Accessibility" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='accessibility'" | |
reuse-configuration-cache: false | |
android-lint-all: | |
name: "Android Lint All" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='all'" | |
reuse-configuration-cache: false | |
- name: "Merge Lint SARIF results & Move HTML report" | |
shell: "bash" | |
run: | | |
mkdir -p build/reports | |
find . | grep "lint-results.sarif" | xargs jq -s '{ "$schema": "https://json.schemastore.org/sarif-2.1.0", "version": "2.1.0", "runs": map(.runs) | add }' > build/reports/merged-lint.sarif | |
mv app/build/reports/lint-results-release.html build/reports/lint-results.html | |
- name: "Store Android Lint SARIF Report" | |
uses: github/codeql-action/upload-sarif@v3 | |
if: success() | |
with: | |
sarif_file: build/reports/merged-lint.sarif | |
- name: "Store Android Lint HTML Report" | |
uses: actions/[email protected] | |
if: success() | |
with: | |
name: android-lint-default-report | |
path: | | |
build/reports/lint-results.html | |
android-lint-compliance: | |
name: "Android Lint Compliance" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='compliance'" | |
reuse-configuration-cache: false | |
android-lint-correctness: | |
name: "Android Lint Correctness" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='correctness'" | |
reuse-configuration-cache: false | |
android-lint-i18n-strings: | |
name: "Android Lint i18n Strings" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='internationalization-strings'" | |
reuse-configuration-cache: false | |
android-lint-i18n-rtl: | |
name: "Android Lint i18n RTL" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='internationalization-rtl'" | |
reuse-configuration-cache: false | |
android-lint-interop: | |
name: "Android Lint Interop" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='interoperability'" | |
reuse-configuration-cache: false | |
android-lint-impl-issues: | |
name: "Android Lint Impl Issues" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='lint-implementation-issues'" | |
reuse-configuration-cache: false | |
android-lint-performance: | |
name: "Android Lint Performance" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='performance'" | |
reuse-configuration-cache: false | |
android-lint-productivity: | |
name: "Android Lint Productivity" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='productivity'" | |
reuse-configuration-cache: false | |
android-lint-security: | |
name: "Android Lint Security" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='security'" | |
reuse-configuration-cache: false | |
android-lint-testing: | |
name: "Android Lint Testing" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='testing'" | |
reuse-configuration-cache: false | |
android-lint-usability: | |
name: "Android Lint Usability" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: ":app:lintRelease -Plint-config='usability'" | |
reuse-configuration-cache: false | |
build-apk: | |
name: "Build APK" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: "assembleDebug" | |
reuse-configuration-cache: true | |
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: "Store APK" | |
uses: actions/[email protected] | |
with: | |
name: apk | |
path: app/build/outputs/apk/debug/app-debug.apk | |
build-base-apk: | |
name: "Build Base APK" | |
if: github.ref_name != 'main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
ref: ${{ github.event.pull_request.base.sha }} | |
- name: "Build APK from PR base SHA" | |
uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: "assembleDebug" | |
reuse-configuration-cache: true | |
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
optional-suffix: "-base" | |
- name: "Change APK file name" | |
shell: "bash" | |
run: | | |
mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/app-base-debug.apk | |
- name: "Store Base APK" | |
uses: actions/[email protected] | |
with: | |
name: base-apk | |
path: app/build/outputs/apk/debug/app-base-debug.apk | |
build-test-apk: | |
name: "Build Test APK" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradle-task-run | |
with: | |
gradle-tasks: "assembleAndroidTest" | |
reuse-configuration-cache: false | |
optional-suffix: "-test" | |
- name: "Store Test APK" | |
uses: actions/[email protected] | |
with: | |
name: test-apk | |
path: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk | |
diff-apk-from-base: | |
name: "Diff APK from Base" | |
runs-on: ubuntu-latest | |
if: github.secret_source == 'Actions' && github.ref_name != 'main' | |
needs: | |
- build-apk | |
- build-base-apk | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: apk | |
- uses: actions/[email protected] | |
with: | |
name: base-apk | |
- id: diffuse | |
uses: usefulness/diffuse-action@v1 | |
with: | |
old-file-path: app-base-debug.apk | |
new-file-path: app-debug.apk | |
- uses: peter-evans/find-comment@v3 | |
id: find-comment | |
if: ${{ github.event.pull_request }} | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: Diffuse output | |
- uses: peter-evans/create-or-update-comment@v4 | |
if: ${{ github.event.pull_request }} | |
with: | |
body: | | |
Diffuse output: | |
${{ steps.diffuse.outputs.diff-gh-comment }} | |
edit-mode: replace | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/[email protected] | |
with: | |
name: diffuse-output | |
path: ${{ steps.diffuse.outputs.diff-file }} | |
ui-tests: | |
name: "Android UI Tests" | |
runs-on: ubuntu-latest | |
if: github.secret_source == 'Actions' | |
needs: | |
- build-apk | |
- build-test-apk | |
steps: | |
- name: "Git Checkout" | |
uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
name: apk | |
- uses: actions/[email protected] | |
with: | |
name: test-apk | |
- name: "Run tests on emulator.wtf" | |
uses: emulator-wtf/run-tests@v0 | |
with: | |
api-token: ${{ secrets.EW_API_TOKEN }} | |
app: app-debug.apk | |
test: app-debug-androidTest.apk | |
outputs-dir: build/test-results | |
- name: "Publish Test Report" | |
uses: mikepenz/action-junit-report@v4 | |
if: always() # always run even if the tests fail | |
with: | |
check_name: "UI Test Report" | |
report_paths: 'build/test-results/**/*.xml' |