mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-05 05:12:51 -05:00
add a skip value, so we can run and skip tests at the same level. (#2413)
This commit is contained in:
11
.github/workflows/pull-request.yml
vendored
11
.github/workflows/pull-request.yml
vendored
@@ -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 }}
|
||||
|
||||
6
.github/workflows/reusable-android-build.yml
vendored
6
.github/workflows/reusable-android-build.yml
vendored
@@ -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
|
||||
|
||||
6
.github/workflows/reusable-android-test.yml
vendored
6
.github/workflows/reusable-android-test.yml
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user