mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Base CI tweaks for debugging flaky test
This commit is contained in:
parent
5da7b1dd05
commit
d5f7f4339f
39
.github/workflows/ci.yaml
vendored
39
.github/workflows/ci.yaml
vendored
@ -5,7 +5,7 @@ run-name: "${{ github.event_name == 'workflow_dispatch' && format('CI: {0}', git
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev_debug_translation_issue
|
||||||
- rc
|
- rc
|
||||||
- master
|
- master
|
||||||
pull_request: ~
|
pull_request: ~
|
||||||
@ -198,6 +198,8 @@ jobs:
|
|||||||
skip_coverage="true"
|
skip_coverage="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
test_groups="[4]"
|
||||||
|
|
||||||
# Output & sent to GitHub Actions
|
# Output & sent to GitHub Actions
|
||||||
echo "mariadb_groups: ${mariadb_groups}"
|
echo "mariadb_groups: ${mariadb_groups}"
|
||||||
echo "mariadb_groups=${mariadb_groups}" >> $GITHUB_OUTPUT
|
echo "mariadb_groups=${mariadb_groups}" >> $GITHUB_OUTPUT
|
||||||
@ -658,6 +660,7 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
github.event.inputs.mypy-only != 'true'
|
github.event.inputs.mypy-only != 'true'
|
||||||
&& github.event.inputs.audit-licenses-only != 'true'
|
&& github.event.inputs.audit-licenses-only != 'true'
|
||||||
|
&& 'true' == 'false'
|
||||||
|| github.event.inputs.pylint-only == 'true'
|
|| github.event.inputs.pylint-only == 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
@ -704,6 +707,7 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
(github.event.inputs.mypy-only != 'true'
|
(github.event.inputs.mypy-only != 'true'
|
||||||
&& github.event.inputs.audit-licenses-only != 'true'
|
&& github.event.inputs.audit-licenses-only != 'true'
|
||||||
|
&& 'true' == 'false'
|
||||||
|| github.event.inputs.pylint-only == 'true')
|
|| github.event.inputs.pylint-only == 'true')
|
||||||
&& (needs.info.outputs.tests_glob || needs.info.outputs.test_full_suite == 'true')
|
&& (needs.info.outputs.tests_glob || needs.info.outputs.test_full_suite == 'true')
|
||||||
needs:
|
needs:
|
||||||
@ -821,36 +825,8 @@ jobs:
|
|||||||
- base
|
- base
|
||||||
name: Split tests for full run
|
name: Split tests for full run
|
||||||
steps:
|
steps:
|
||||||
- name: Install additional OS dependencies
|
|
||||||
run: |
|
|
||||||
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install \
|
|
||||||
bluez \
|
|
||||||
ffmpeg \
|
|
||||||
libturbojpeg \
|
|
||||||
libgammu-dev
|
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
|
|
||||||
id: python
|
|
||||||
uses: actions/setup-python@v5.3.0
|
|
||||||
with:
|
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
|
||||||
check-latest: true
|
|
||||||
- name: Restore base Python virtual environment
|
|
||||||
id: cache-venv
|
|
||||||
uses: actions/cache/restore@v4.1.2
|
|
||||||
with:
|
|
||||||
path: venv
|
|
||||||
fail-on-cache-miss: true
|
|
||||||
key: >-
|
|
||||||
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
|
|
||||||
needs.info.outputs.python_cache_key }}
|
|
||||||
- name: Run split_tests.py
|
|
||||||
run: |
|
|
||||||
. venv/bin/activate
|
|
||||||
python -m script.split_tests ${{ needs.info.outputs.test_group_count }} tests
|
|
||||||
- name: Upload pytest_buckets
|
- name: Upload pytest_buckets
|
||||||
uses: actions/upload-artifact@v4.4.3
|
uses: actions/upload-artifact@v4.4.3
|
||||||
with:
|
with:
|
||||||
@ -941,11 +917,10 @@ jobs:
|
|||||||
|
|
||||||
echo "Test group ${{ matrix.group }}: $(sed -n "${{ matrix.group }},1p" pytest_buckets.txt)"
|
echo "Test group ${{ matrix.group }}: $(sed -n "${{ matrix.group }},1p" pytest_buckets.txt)"
|
||||||
python3 -b -X dev -m pytest \
|
python3 -b -X dev -m pytest \
|
||||||
-qq \
|
-x \
|
||||||
--timeout=9 \
|
--timeout=9 \
|
||||||
--durations=10 \
|
--durations=10 \
|
||||||
--numprocesses auto \
|
--numprocesses auto \
|
||||||
--snapshot-details \
|
|
||||||
--dist=loadfile \
|
--dist=loadfile \
|
||||||
${cov_params[@]} \
|
${cov_params[@]} \
|
||||||
-o console_output_style=count \
|
-o console_output_style=count \
|
||||||
@ -989,6 +964,7 @@ jobs:
|
|||||||
&& github.event.inputs.mypy-only != 'true'
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
&& github.event.inputs.audit-licenses-only != 'true'
|
&& github.event.inputs.audit-licenses-only != 'true'
|
||||||
&& needs.info.outputs.mariadb_groups != '[]'
|
&& needs.info.outputs.mariadb_groups != '[]'
|
||||||
|
&& 'true' == 'false'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
@ -1116,6 +1092,7 @@ jobs:
|
|||||||
&& github.event.inputs.mypy-only != 'true'
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
&& github.event.inputs.audit-licenses-only != 'true'
|
&& github.event.inputs.audit-licenses-only != 'true'
|
||||||
&& needs.info.outputs.postgresql_groups != '[]'
|
&& needs.info.outputs.postgresql_groups != '[]'
|
||||||
|
&& 'true' == 'false'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -136,4 +136,4 @@ tmp_cache
|
|||||||
.ropeproject
|
.ropeproject
|
||||||
|
|
||||||
# Will be created from script/split_tests.py
|
# Will be created from script/split_tests.py
|
||||||
pytest_buckets.txt
|
# pytest_buckets.txt
|
4
pytest_buckets.txt
Normal file
4
pytest_buckets.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tests/components/cloud tests/pylint tests/components/habitica tests/components/netatmo tests/components/unifi tests/components/blebox tests/components/tts tests/components/bthome tests/components/energy tests/components/bmw_connected_drive tests/components/bang_olufsen tests/components/utility_meter tests/components/spotify tests/components/roborock tests/components/yale tests/components/mysensors tests/components/rflink tests/components/zeroconf tests/components/wiz tests/components/energyzero tests/components/dhcp tests/components/nextdns tests/components/fronius tests/components/androidtv_remote tests/components/lutron_caseta tests/components/usb tests/components/scrape tests/components/lovelace tests/components/matrix tests/components/wallbox tests/components/konnected tests/components/coolmaster tests/components/transmission tests/components/anthropic tests/components/bayesian tests/components/schedule tests/components/upnp tests/components/fibaro tests/components/ista_ecotrend tests/components/tankerkoenig tests/components/greeneye_monitor tests/components/sonarr tests/components/mystrom tests/components/derivative tests/components/repairs tests/components/google_translate tests/components/nina tests/components/chacon_dio tests/components/kostal_plenticore tests/components/dlink tests/components/icloud tests/components/vlc_telnet tests/components/osoenergy tests/components/aseko_pool_live tests/components/energenie_power_sockets tests/components/oralb tests/components/trafikverket_ferry tests/components/netgear_lte tests/components/watttime tests/components/enocean tests/components/plant tests/components/airnow tests/components/evil_genius_labs tests/components/landisgyr_heat_meter tests/components/palazzetti tests/components/zerproc tests/components/openexchangerates tests/components/smtp tests/components/apsystems tests/components/cpuspeed tests/components/notion tests/components/velbus tests/components/apprise tests/components/ialarm tests/components/ovo_energy tests/components/agent_dvr tests/components/file_upload tests/components/ld2410_ble tests/components/sanix tests/components/yandex_transport tests/components/lutron tests/components/ridwell tests/components/traccar tests/components/brottsplatskartan tests/components/econet tests/components/hko tests/components/progettihwsw tests/components/aprilaire tests/components/iss tests/components/mythicbeastsdns tests/components/aftership tests/components/hardware tests/components/pvpc_hourly_pricing tests/components/transport_nsw tests/components/image_upload tests/components/qnap tests/components/twilio/test_init.py
|
@ -777,9 +777,6 @@ async def check_translations(
|
|||||||
f"Unused ignore translations: {', '.join(unused_ignore)}. "
|
f"Unused ignore translations: {', '.join(unused_ignore)}. "
|
||||||
"Please remove them from the ignore_translations fixture."
|
"Please remove them from the ignore_translations fixture."
|
||||||
)
|
)
|
||||||
for key, description in translation_errors.items():
|
for description in translation_errors.values():
|
||||||
if key.startswith("component.cloud.issues."):
|
|
||||||
# cloud tests are flaky
|
|
||||||
continue
|
|
||||||
if description not in {"used", "unused"}:
|
if description not in {"used", "unused"}:
|
||||||
pytest.fail(description)
|
pytest.fail(description)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user