Skip to content

Commit

Permalink
Base CI tweaks for debugging flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed Nov 26, 2024
1 parent 5da7b1d commit d5f7f43
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 36 deletions.
39 changes: 8 additions & 31 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ run-name: "${{ github.event_name == 'workflow_dispatch' && format('CI: {0}', git
on:
push:
branches:
- dev
- dev_debug_translation_issue
- rc
- master
pull_request: ~
Expand Down Expand Up @@ -198,6 +198,8 @@ jobs:
skip_coverage="true"
fi
test_groups="[4]"
# Output & sent to GitHub Actions
echo "mariadb_groups: ${mariadb_groups}"
echo "mariadb_groups=${mariadb_groups}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -658,6 +660,7 @@ jobs:
if: |
github.event.inputs.mypy-only != 'true'
&& github.event.inputs.audit-licenses-only != 'true'
&& 'true' == 'false'
|| github.event.inputs.pylint-only == 'true'
needs:
- info
Expand Down Expand Up @@ -704,6 +707,7 @@ jobs:
if: |
(github.event.inputs.mypy-only != 'true'
&& github.event.inputs.audit-licenses-only != 'true'
&& 'true' == 'false'
|| github.event.inputs.pylint-only == 'true')
&& (needs.info.outputs.tests_glob || needs.info.outputs.test_full_suite == 'true')
needs:
Expand Down Expand Up @@ -821,36 +825,8 @@ jobs:
- base
name: Split tests for full run
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
uses: actions/[email protected]
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/[email protected]
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
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -941,11 +917,10 @@ jobs:
echo "Test group ${{ matrix.group }}: $(sed -n "${{ matrix.group }},1p" pytest_buckets.txt)"
python3 -b -X dev -m pytest \
-qq \
-x \
--timeout=9 \
--durations=10 \
--numprocesses auto \
--snapshot-details \
--dist=loadfile \
${cov_params[@]} \
-o console_output_style=count \
Expand Down Expand Up @@ -989,6 +964,7 @@ jobs:
&& github.event.inputs.mypy-only != 'true'
&& github.event.inputs.audit-licenses-only != 'true'
&& needs.info.outputs.mariadb_groups != '[]'
&& 'true' == 'false'
needs:
- info
- base
Expand Down Expand Up @@ -1116,6 +1092,7 @@ jobs:
&& github.event.inputs.mypy-only != 'true'
&& github.event.inputs.audit-licenses-only != 'true'
&& needs.info.outputs.postgresql_groups != '[]'
&& 'true' == 'false'
needs:
- info
- base
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ tmp_cache
.ropeproject

# Will be created from script/split_tests.py
pytest_buckets.txt
# pytest_buckets.txt
4 changes: 4 additions & 0 deletions pytest_buckets.txt
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions tests/components/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,6 @@ def _issue_registry_async_create_issue(
f"Unused ignore translations: {', '.join(unused_ignore)}. "
"Please remove them from the ignore_translations fixture."
)
for key, description in translation_errors.items():
if key.startswith("component.cloud.issues."):
# cloud tests are flaky
continue
for description in translation_errors.values():
if description not in {"used", "unused"}:
pytest.fail(description)

0 comments on commit d5f7f43

Please sign in to comment.