-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from kivancsikert/testing/wokwi-take-2
Introduce testing with Wokwi, take 2
- Loading branch information
Showing
16 changed files
with
241 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
.vscode/* | ||
/.vscode/* | ||
|
||
*.log | ||
|
||
# File system image | ||
data/ | ||
data-unused/ | ||
/data/ | ||
/data-unused/ | ||
|
||
# ESP-IDF generated files | ||
/build/ | ||
/managed_components/ | ||
sdkconfig* | ||
!sdkconfig*.defaults | ||
dependencies*.lock | ||
/sdkconfig* | ||
/!sdkconfig*.defaults | ||
/dependencies*.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.env | ||
/mosquitto/data/ | ||
/mosquitto/log/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
mqtt-relay: | ||
build: mosquitto | ||
environment: | ||
- BROKER_ADDRESS=${BROKER_ADDRESS} | ||
ports: | ||
- "1883:1883" | ||
volumes: | ||
- ./mosquitto/data:/mosquitto/data | ||
- ./mosquitto/log:/mosquitto/log | ||
|
||
wokwi: | ||
image: wokwi/wokwi-ci-server | ||
ports: | ||
- "9177:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM eclipse-mosquitto:2.0-openssl | ||
|
||
# Install envsubst (part of GNU gettext) | ||
RUN apk add --no-cache gettext | ||
|
||
COPY mosquitto.conf.template /mosquitto/config/mosquitto.conf.template | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
envsubst < /mosquitto/config/mosquitto.conf.template > /mosquitto/config/mosquitto.conf | ||
exec mosquitto -c /mosquitto/config/mosquitto.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
allow_anonymous true | ||
listener 1883 0.0.0.0 | ||
|
||
connection bumblebee_bridge | ||
address ${BROKER_ADDRESS}:1883 | ||
topic # both 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
{ | ||
"version": 1, | ||
"author": "Lóránt Pintér", | ||
"editor": "wokwi", | ||
"parts": [ | ||
{ "type": "board-esp32-s3-devkitc-1", "id": "esp", "top": -0.18, "left": 4.57, "attrs": {} }, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "statusLed", | ||
"top": -32.4, | ||
"left": 186.2, | ||
"attrs": { "color": "white", "label": "Status" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r1", | ||
"top": 32.75, | ||
"left": 163.2, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "statusLed2", | ||
"top": -32.4, | ||
"left": 253.4, | ||
"attrs": { "color": "white", "label": "Status-2" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r7", | ||
"top": 32.75, | ||
"left": 230.4, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-potentiometer", | ||
"id": "battery", | ||
"top": -106.9, | ||
"left": 9.4, | ||
"attrs": { "value": "950" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r2", | ||
"top": 119.45, | ||
"left": -116.6, | ||
"rotate": 180, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "dain1Led", | ||
"top": 63.6, | ||
"left": -178.6, | ||
"attrs": { "color": "yellow", "label": "DAIN1", "flip": "" } | ||
}, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "dain2Led", | ||
"top": 63.6, | ||
"left": -111.4, | ||
"attrs": { "color": "orange", "label": "DAIN2", "flip": "" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r3", | ||
"top": 119.45, | ||
"left": -193.4, | ||
"rotate": 180, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "nsleepLed", | ||
"top": 140.4, | ||
"left": -53.8, | ||
"attrs": { "color": "red", "label": "NSleep", "flip": "" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r4", | ||
"top": 196.25, | ||
"left": -59, | ||
"rotate": 180, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "dbin1Led", | ||
"top": 169.2, | ||
"left": -178.6, | ||
"attrs": { "color": "yellow", "label": "DBIN1", "flip": "" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r5", | ||
"top": 227.25, | ||
"left": -109.6, | ||
"rotate": 180, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-led", | ||
"id": "dbin2Led", | ||
"top": 169.2, | ||
"left": -111.4, | ||
"attrs": { "color": "orange", "label": "DBIN2", "flip": "" } | ||
}, | ||
{ | ||
"type": "wokwi-resistor", | ||
"id": "r6", | ||
"top": 225.05, | ||
"left": -193.4, | ||
"rotate": 180, | ||
"attrs": { "value": "22" } | ||
}, | ||
{ | ||
"type": "wokwi-pushbutton", | ||
"id": "btn1", | ||
"top": 169.4, | ||
"left": 153.6, | ||
"attrs": { "color": "green", "label": "Flash", "bounce": "0" } | ||
} | ||
], | ||
"connections": [ | ||
[ "esp:TX", "$serialMonitor:RX", "", [] ], | ||
[ "esp:RX", "$serialMonitor:TX", "", [] ], | ||
[ "statusLed:C", "esp:2", "black", [] ], | ||
[ "statusLed:A", "r1:2", "green", [] ], | ||
[ "r1:1", "esp:3V3.2", "green", [ "v0" ] ], | ||
[ "battery:VCC", "esp:3V3.1", "red", [ "v0" ] ], | ||
[ "battery:GND", "esp:GND.2", "black", [ "v0" ] ], | ||
[ "battery:SIG", "esp:1", "green", [ "v0" ] ], | ||
[ "dain1Led:A", "esp:16", "green", [] ], | ||
[ "dain1Led:C", "r3:2", "green", [ "h-28.4", "v19.2" ] ], | ||
[ "r2:1", "esp:GND.1", "black", [ "v0" ] ], | ||
[ "dain2Led:A", "esp:17", "green", [] ], | ||
[ "dain2Led:C", "r2:2", "green", [ "h0" ] ], | ||
[ "r3:1", "esp:GND.1", "black", [ "v0" ] ], | ||
[ "nsleepLed:A", "esp:47", "green", [ "v0" ] ], | ||
[ "dbin1Led:A", "esp:8", "green", [] ], | ||
[ "dbin1Led:C", "r6:2", "green", [] ], | ||
[ "r5:1", "esp:GND.1", "black", [ "v0" ] ], | ||
[ "dbin2Led:A", "esp:18", "green", [] ], | ||
[ "dbin2Led:C", "r5:2", "green", [] ], | ||
[ "r6:1", "esp:GND.1", "black", [ "v0" ] ], | ||
[ "statusLed2:A", "r7:2", "green", [] ], | ||
[ "r7:1", "esp:3V3.2", "green", [ "v0" ] ], | ||
[ "statusLed2:C", "esp:4", "green", [ "v0" ] ], | ||
[ "nsleepLed:C", "r4:2", "green", [ "h-18.8", "v28.8" ] ], | ||
[ "r4:1", "esp:GND.1", "black", [ "v0" ] ], | ||
[ "esp:GND.4", "btn1:2.l", "black", [ "h0" ] ], | ||
[ "esp:0", "btn1:1.l", "green", [ "h0" ] ] | ||
], | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[wokwi] | ||
version = 1 | ||
firmware = '../build/flasher_args.json' | ||
elf = '../build/ugly-duckling.elf' |