Files
Meghdad 8588c2f3ad
Android checks / cli (push) Canceled after 0s
Android checks / verify (push) Canceled after 0s
Add CLI for managing SFTP recording backups
2026-10-16 16:04:53 +03:30

90 lines
2.8 KiB
YAML

name: Android checks
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: android-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cli:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Install isolated CLI and build tools
run: |
python3 -m venv /tmp/remember-cli-ci
/tmp/remember-cli-ci/bin/python -m pip install 'setuptools>=77' build .
- name: Test CLI and disposable loopback SFTP integration
run: /tmp/remember-cli-ci/bin/python -m unittest discover -s tests/cli -v
- name: Build and smoke-test CLI distributions
run: |
/tmp/remember-cli-ci/bin/python -m build --no-isolation
/tmp/remember-cli-ci/bin/python -m pip install --force-reinstall --no-deps dist/*.whl
/tmp/remember-cli-ci/bin/remember --help
- name: Upload CLI distributions
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: remember-backup-cli
path: dist/
if-no-files-found: error
retention-days: 14
verify:
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Set up Java 21
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6
with:
distribution: temurin
java-version: '21'
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@be39fa834029ff78f1a44aa3bb0819b8fc2bd8fd # v4
with:
packages: 'platform-tools platforms;android-36.1 build-tools;36.1.0'
- name: Verify Gradle wrapper
run: sha256sum --check gradle/wrapper/gradle-wrapper.jar.sha256
- name: Build, lint, test, and compile device tests
run: ./gradlew --no-daemon :app:assembleDebug :app:lintDebug :app:testDebugUnitTest :app:assembleDebugAndroidTest
- name: Upload check reports
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: check-reports
path: app/build/reports/
if-no-files-found: ignore
retention-days: 14
- name: Upload debug APK
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: remember-debug-apk
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 14