File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 18
18
mkdir -p $GITHUB_WORKSPACE/libraries
19
19
mkdir -p $GITHUB_WORKSPACE/.arduino15
20
20
mkdir -p $GITHUB_WORKSPACE/Arduino
21
+ mkdir -p $GITHUB_WORKSPACE/mocks # Create a directory for mock files
22
+
23
+ - name : Create mock ESP8266WiFi.h
24
+ run : |
25
+ cat > $GITHUB_WORKSPACE/mocks/ESP8266WiFi.h << 'EOF'
26
+ #ifndef ESP8266WIFI_MOCK_H
27
+ #define ESP8266WIFI_MOCK_H
28
+
29
+ #include <Arduino.h>
30
+
31
+ class WiFiClass {
32
+ public:
33
+ void begin(const char* ssid, const char* password) {}
34
+ void disconnect() {}
35
+ bool isConnected() { return true; }
36
+ IPAddress localIP() { return IPAddress(192, 168, 1, 1); }
37
+ };
38
+
39
+ extern WiFiClass WiFi;
40
+
41
+ #endif // ESP8266WIFI_MOCK_H
42
+ EOF
21
43
22
44
- name : Setup Arduino CLI
23
45
uses : arduino/setup-arduino-cli@v1
79
101
80
102
- name : Run tests
81
103
run : |
82
- bundle exec arduino_ci.rb
104
+ # Add the mock directory to the include path
105
+ export CPLUS_INCLUDE_PATH=$GITHUB_WORKSPACE/mocks:$CPLUS_INCLUDE_PATH
106
+ bundle exec arduino_ci.rb
You can’t perform that action at this time.
0 commit comments