mirror of
https://github.com/esphome/esphome.git
synced 2025-11-01 07:31:51 +00:00
flatten
This commit is contained in:
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -537,12 +537,12 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
|
|
||||||
test-build-components-split:
|
test-build-components-split:
|
||||||
name: Test components batch (${{ join(matrix.components, ' ') }})
|
name: Test components batch (${{ matrix.components }})
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs:
|
needs:
|
||||||
- common
|
- common
|
||||||
- determine-jobs
|
- determine-jobs
|
||||||
if: github.event_name == 'pull_request' && needs.determine-jobs.outputs.component-test-batches != '[]'
|
if: github.event_name == 'pull_request' && fromJSON(needs.determine-jobs.outputs.component-test-count) > 0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: ${{ (startsWith(github.base_ref, 'beta') || startsWith(github.base_ref, 'release')) && 8 || 4 }}
|
max-parallel: ${{ (startsWith(github.base_ref, 'beta') || startsWith(github.base_ref, 'release')) && 8 || 4 }}
|
||||||
@@ -555,7 +555,7 @@ jobs:
|
|||||||
df -h
|
df -h
|
||||||
|
|
||||||
- name: List components
|
- name: List components
|
||||||
run: echo ${{ join(matrix.components, ' ') }}
|
run: echo ${{ matrix.components }}
|
||||||
|
|
||||||
- name: Cache apt packages
|
- name: Cache apt packages
|
||||||
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.5.3
|
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.5.3
|
||||||
|
|||||||
@@ -695,15 +695,17 @@ def main() -> None:
|
|||||||
|
|
||||||
# Split components into batches for CI testing
|
# Split components into batches for CI testing
|
||||||
# This intelligently groups components with similar bus configurations
|
# This intelligently groups components with similar bus configurations
|
||||||
component_test_batches: list[list[str]]
|
component_test_batches: list[str]
|
||||||
if changed_components_with_tests:
|
if changed_components_with_tests:
|
||||||
tests_dir = Path(root_path) / ESPHOME_TESTS_COMPONENTS_PATH
|
tests_dir = Path(root_path) / ESPHOME_TESTS_COMPONENTS_PATH
|
||||||
component_test_batches, _ = create_intelligent_batches(
|
batches, _ = create_intelligent_batches(
|
||||||
components=changed_components_with_tests,
|
components=changed_components_with_tests,
|
||||||
tests_dir=tests_dir,
|
tests_dir=tests_dir,
|
||||||
batch_size=COMPONENT_TEST_BATCH_SIZE,
|
batch_size=COMPONENT_TEST_BATCH_SIZE,
|
||||||
directly_changed=directly_changed_with_tests,
|
directly_changed=directly_changed_with_tests,
|
||||||
)
|
)
|
||||||
|
# Convert batches to space-separated strings for CI matrix
|
||||||
|
component_test_batches = [" ".join(batch) for batch in batches]
|
||||||
else:
|
else:
|
||||||
component_test_batches = []
|
component_test_batches = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user