mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
chore(ci): Refactor and optimize GitHub Actions workflows (#4252)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
d9bc79b396
commit
cf48d6c1c1
6 changed files with 144 additions and 59 deletions
37
.github/workflows/reusable-lint.yml
vendored
Normal file
37
.github/workflows/reusable-lint.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Reusable Lint and Format Check
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest # Lint is fast, doesn't need large runner
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'jetbrains'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
with:
|
||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
build-scan-publish: true
|
||||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
||||
build-scan-terms-of-use-agree: 'yes'
|
||||
add-job-summary: always
|
||||
|
||||
- name: Run Spotless and Detekt
|
||||
run: ./gradlew spotlessCheck detekt --scan
|
||||
Loading…
Add table
Add a link
Reference in a new issue