add a skip value, so we can run and skip tests at the same level. (#2413)

This commit is contained in:
DaneEvans
2025-07-12 11:31:58 +10:00
committed by GitHub
parent 929dc5e6f0
commit 91cc999523
3 changed files with 20 additions and 3 deletions

View File

@@ -15,22 +15,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Always pass for scheduled-updates
run: echo Scheduled updates branch, auto-passing by default.
run: |
echo Scheduled updates branch, auto-passing by default.
echo We could add an xml linter here.
build_and_detekt:
if: github.repository == 'meshtastic/Meshtastic-Android' && github.head_ref != 'scheduled-updates'
if: github.repository == 'meshtastic/Meshtastic-Android'
uses: ./.github/workflows/reusable-android-build.yml
with:
skip_tests: ${{ github.head_ref == 'scheduled-updates' }}
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
# inputs.upload_artifacts defaults to true, so no need to specify for PRs
androidTest:
# AssumingandroidTest should also only run for the main repository
if: github.repository == 'meshtastic/Meshtastic-Android' && github.head_ref != 'scheduled-updates'
if: github.repository == 'meshtastic/Meshtastic-Android'
uses: ./.github/workflows/reusable-android-test.yml
with:
api_levels: '[35]' # Run only on API 35 for PRs
skip_tests: ${{ github.head_ref == 'scheduled-updates' }}
# upload_artifacts defaults to true, so no need to explicitly set
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

View File

@@ -8,6 +8,11 @@ on:
required: false
type: boolean
default: true
skip_tests:
description: 'Whether to skip running tests'
required: false
type: boolean
default: false
secrets:
GRADLE_ENCRYPTION_KEY:
required: false
@@ -16,6 +21,7 @@ jobs:
build_and_detekt:
runs-on: ubuntu-latest
timeout-minutes: 35
if: ${{ !inputs.skip_tests }}
steps:
- name: Checkout code
uses: actions/checkout@v4

View File

@@ -13,12 +13,18 @@ on:
required: false
type: string
default: '[26, 35]' # Default to running both if not specified by caller
skip_tests:
description: 'Whether to skip running tests'
required: false
type: boolean
default: false
secrets:
GRADLE_ENCRYPTION_KEY:
required: false
jobs:
androidTest:
if: ${{ !inputs.skip_tests }}
runs-on: ubuntu-latest
timeout-minutes: 25
strategy: