mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
add a skip value, so we can run and skip tests at the same level. (#2413)
This commit is contained in:
parent
929dc5e6f0
commit
91cc999523
3 changed files with 20 additions and 3 deletions
11
.github/workflows/pull-request.yml
vendored
11
.github/workflows/pull-request.yml
vendored
|
|
@ -15,22 +15,27 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Always pass for scheduled-updates
|
- 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:
|
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
|
uses: ./.github/workflows/reusable-android-build.yml
|
||||||
|
with:
|
||||||
|
skip_tests: ${{ github.head_ref == 'scheduled-updates' }}
|
||||||
secrets:
|
secrets:
|
||||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
# inputs.upload_artifacts defaults to true, so no need to specify for PRs
|
# inputs.upload_artifacts defaults to true, so no need to specify for PRs
|
||||||
|
|
||||||
androidTest:
|
androidTest:
|
||||||
# AssumingandroidTest should also only run for the main repository
|
# 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
|
uses: ./.github/workflows/reusable-android-test.yml
|
||||||
with:
|
with:
|
||||||
api_levels: '[35]' # Run only on API 35 for PRs
|
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
|
# upload_artifacts defaults to true, so no need to explicitly set
|
||||||
secrets:
|
secrets:
|
||||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
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
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
skip_tests:
|
||||||
|
description: 'Whether to skip running tests'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
secrets:
|
secrets:
|
||||||
GRADLE_ENCRYPTION_KEY:
|
GRADLE_ENCRYPTION_KEY:
|
||||||
required: false
|
required: false
|
||||||
|
|
@ -16,6 +21,7 @@ jobs:
|
||||||
build_and_detekt:
|
build_and_detekt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 35
|
timeout-minutes: 35
|
||||||
|
if: ${{ !inputs.skip_tests }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
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
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: '[26, 35]' # Default to running both if not specified by caller
|
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:
|
secrets:
|
||||||
GRADLE_ENCRYPTION_KEY:
|
GRADLE_ENCRYPTION_KEY:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
androidTest:
|
androidTest:
|
||||||
|
if: ${{ !inputs.skip_tests }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
strategy:
|
strategy:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue