Skip to content

GEN-2064 Home screen top bar icons #4162

GEN-2064 Home screen top bar icons

GEN-2064 Home screen top bar icons #4162

Workflow file for this run

name: PR
on: pull_request
concurrency:
group: ref-${{ github.ref }}
cancel-in-progress: true
jobs:
unit_test:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v4
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Add GitHub Packages auth
run: ./scripts/ci-github-packages-properties.sh
env:
HEDVIG_GITHUB_PACKAGES_USER: ${{ secrets.HEDVIG_GITHUB_PACKAGES_USER }}
HEDVIG_GITHUB_PACKAGES_TOKEN: ${{ secrets.HEDVIG_GITHUB_PACKAGES_TOKEN }}
- name: Setup JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
# Only write to the cache for builds on the 'develop' branch
cache-read-only: false
gradle-home-cache-cleanup: true
- name: Prebuild
run: ./scripts/ci-prebuild.sh
env:
LOKALISE_ID: ${{ secrets.LOKALISE_ID }}
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
- name: Unit tests
run: ./gradlew testDebugUnitTest
- uses: test-summary/action@v2
with:
paths: "app/build/test-results/testDebugUnitTest/**/TEST-*.xml"
if: always()
lint:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v4
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Add GitHub Packages auth
run: ./scripts/ci-github-packages-properties.sh
env:
HEDVIG_GITHUB_PACKAGES_USER: ${{ secrets.HEDVIG_GITHUB_PACKAGES_USER }}
HEDVIG_GITHUB_PACKAGES_TOKEN: ${{ secrets.HEDVIG_GITHUB_PACKAGES_TOKEN }}
- name: Setup JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
# Only write to the cache for builds on the 'develop' branch
cache-read-only: false
gradle-home-cache-cleanup: true
- name: Prebuild
run: ./scripts/ci-prebuild.sh
env:
LOKALISE_ID: ${{ secrets.LOKALISE_ID }}
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
- run: ./gradlew lint
- uses: yutailang0119/action-android-lint@v4.0.0
with:
report-path: app/build/reports/lint-results-debug.xml
continue-on-error: true
ktlint:
runs-on: ubuntu-latest-8-vcpu
steps:
- uses: actions/checkout@v4
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Add GitHub Packages auth
run: ./scripts/ci-github-packages-properties.sh
env:
HEDVIG_GITHUB_PACKAGES_USER: ${{ secrets.HEDVIG_GITHUB_PACKAGES_USER }}
HEDVIG_GITHUB_PACKAGES_TOKEN: ${{ secrets.HEDVIG_GITHUB_PACKAGES_TOKEN }}
- name: Setup JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
# Only write to the cache for builds on the 'develop' branch
cache-read-only: false
gradle-home-cache-cleanup: true
- name: Prebuild
run: ./scripts/ci-prebuild.sh
env:
LOKALISE_ID: ${{ secrets.LOKALISE_ID }}
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
- name: run ktlint from gradle
continue-on-error: true
run: ./gradlew ktlintCheck
- name: Annotate ktlint errors in the PR
continue-on-error: false
uses: yutailang0119/action-ktlint@v4
with:
report-path: build/reports/ktlint/*.xml
build:
runs-on: ubuntu-latest-8-vcpu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Add GitHub Packages auth
run: ./scripts/ci-github-packages-properties.sh
env:
HEDVIG_GITHUB_PACKAGES_USER: ${{ secrets.HEDVIG_GITHUB_PACKAGES_USER }}
HEDVIG_GITHUB_PACKAGES_TOKEN: ${{ secrets.HEDVIG_GITHUB_PACKAGES_TOKEN }}
- name: Setup JDK 17
uses: actions/setup-java@v4.2.1
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
# Only write to the cache for builds on the 'develop' branch
cache-read-only: false
gradle-home-cache-cleanup: true
- run: echo VERSION_CODE=$(expr 4700 + ${{ github.run_number }} + ${{ github.run_attempt }} - 1) >> $GITHUB_ENV
- uses: chkfung/android-version-actions@v1.2
with:
gradlePath: app/app/build.gradle.kts
versionCode: ${{ env.VERSION_CODE }}
- name: Prebuild
run: ./scripts/ci-prebuild.sh
env:
LOKALISE_ID: ${{ secrets.LOKALISE_ID }}
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
- name: Run license release report
run: ./gradlew licenseReleaseReport --no-configuration-cache --continue
continue-on-error: true
- name: Build
run: "./gradlew :app:assembleDebug"
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_app
with:
releaseDirectory: app/app/build/outputs/apk/debug
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- uses: actions/upload-artifact@v4
with:
name: Pull Request-Build
path: ${{ steps.sign_app.outputs.signedReleaseFile }}