mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
The release unit tests ran inside the compile job, after assembleRelease and before the testkey-signed APK was uploaded. PR Release Publish waits for the Build APK workflow to finish, so every test build waited 3-6 minutes on the tests, and a Maven 429 during Robolectric's jar download failed the build outright. testReleaseUnitTest now runs in its own Unit tests workflow on a hosted runner, where the Robolectric jar cache always applies. It needs neither the prepared components nor the Rust stores (-PskipRust=true). Build APK publishes as soon as the APK compiles. Merges and releases stay gated: Build validation folds the Unit tests result into the "Build APK" commit status, and Release APKs refuses a commit without a passing Unit tests run. The main Preview build no longer waits for the Kotlin unit tests; the PR's tests have already passed by then.
41 lines
940 B
YAML
41 lines
940 B
YAML
name: Build validation
|
|
|
|
on:
|
|
pull_request_target:
|
|
branches: [main]
|
|
types: [opened, synchronize, reopened, edited, ready_for_review]
|
|
push:
|
|
branches: [main]
|
|
workflow_run:
|
|
workflows: [Build APK, Unit tests]
|
|
types: [completed]
|
|
workflow_dispatch:
|
|
inputs:
|
|
pr_number:
|
|
description: Pull request to validate; empty for main
|
|
required: false
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
pull-requests: read
|
|
statuses: write
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate source and build result
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 70
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.workflow_sha }}
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- name: Validate source and APK compilation
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh auth setup-git
|
|
python3 tools/release/validate_apk.py
|