mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-02 20:21:59 -05:00
Run Kotlin tests beside APK compilation while keeping merge and release checks intact. Pin the APK and test workflows to the same pull request base, retry Robolectric rate limits on both Maven Central hosts, and verify source parity when main advances.
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
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
|
|
|
|
# Build APK and Unit tests each trigger a validation, and the last one to post sets the status. Queued runs for a
|
|
# commit wait, so the newest one reads both results and posts last.
|
|
concurrency:
|
|
group: build-validation-${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha || inputs.pr_number || github.sha }}
|
|
cancel-in-progress: false
|
|
|
|
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
|