Skip to content

Commit

Permalink
Add test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wrfz committed Nov 19, 2024
1 parent dc01e3b commit 404561b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@ jobs:
with:
python-version: '3.10'

- name: Install Wokwi CLI
- name: Install Node.js and Wokwi CLI
run: |
sudo apt update
sudo apt install -y npm
sudo npm install -g @wokwi/cli
sudo apt install -y git npm
git clone https://github.com/wokwi/wokwi-cli
cd wokwi-cli
npm install
sudo npm link # Macht die CLI global verfügbar
- name: Install dependencies
- name: Install Python dependencies
run: |
pip install esphome pytest pyserial
- name: Run Wokwi simulation with UART tests
run: |
wokwi-cli exec \
--project=./wokwi-project \
--command="pytest tests/test_uart.py --disable-warnings"
--command="pytest test/test_uart_test.py --disable-warnings"
21 changes: 21 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test Daikin Rotex UART Component

on:
push:
branches:
- wokwi
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PlatformIO
uses: platformio/action-core@v2

- name: Run tests
run: platformio test
10 changes: 10 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

```ini
[platformio]
default_envs = native

[env:native]
platform = native
build_flags =
-Icomponents/daikin_rotex_uart
test_build_project_src = no

0 comments on commit 404561b

Please sign in to comment.