Skip to content

Commit e71365f

Browse files
committed
fix(examples): Use configured public broker for MQTT linux test
Also updated pre-commit hook versions, as some don't work in py3.12
1 parent 8dbf0e4 commit e71365f

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

.github/workflows/examples_build-host-test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ jobs:
5959
- name: Build with IDF-${{ matrix.idf_ver }}
6060
shell: bash
6161
run: |
62+
. ${GITHUB_WORKSPACE}/ci/config_env.sh
6263
. ${IDF_PATH}/export.sh
6364
python -m pip install idf-build-apps
64-
python ./ci/build_apps.py examples/mqtt -l -t linux
65-
timeout 5 ./examples/mqtt/build_linux_default/esp_mqtt_demo.elf | tee test.log || true
65+
python ./ci/build_apps.py examples/mqtt -l -t linux -r 'sdkconfig.ci'
66+
timeout 5 ./examples/mqtt/build_linux/esp_mqtt_demo.elf | tee test.log || true
6667
grep 'MQTT_EVENT_DATA' test.log
6768
6869
run_on_target:

.pre-commit-config.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ repos:
2525
(?x)^(
2626
.*.py
2727
)$
28-
- repo: https://github.com/myint/unify
29-
rev: v0.5
30-
hooks:
31-
- id: unify
32-
- repo: https://github.com/pre-commit/mirrors-yapf
33-
rev: "v0.32.0"
28+
- repo: https://github.com/google/yapf
29+
rev: "v0.43.0"
3430
hooks:
3531
- id: yapf
3632
args: ['style={based_on_style: google, column_limit: 160, indent_width: 4}']
@@ -39,7 +35,7 @@ repos:
3935
hooks:
4036
- id: isort
4137
- repo: https://github.com/myint/eradicate/
42-
rev: v2.1.0
38+
rev: 3.0.0
4339
hooks:
4440
- id: eradicate
4541
- repo: https://github.com/espressif/check-copyright/

ci/build_apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565

6666
sys.exit(
6767
build_apps(apps,
68+
verbose=2,
6869
dry_run=False,
6970
keep_going=False,
7071
no_preserve=args.delete,

ci/config_env.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
# This script is used to set some common variables for the CI pipeline.
3+
4+
set -e
5+
6+
# MQTT public broker URI
7+
export CI_MQTT_BROKER_URI="broker.emqx.io"

examples/mqtt/sdkconfig.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# CONFIG_ESP_EVENT_POST_FROM_ISR is not set
2+
CONFIG_BROKER_URL="mqtt://${CI_MQTT_BROKER_URI}"

0 commit comments

Comments
 (0)