update tests, result ignore
This commit is contained in:
parent
6e6ad431ba
commit
c6776a2daf
3 changed files with 14 additions and 8 deletions
9
.github/workflows/run-tests.yml
vendored
9
.github/workflows/run-tests.yml
vendored
|
|
@ -6,6 +6,10 @@ name: WipperSnapper Tests
|
|||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -25,7 +29,6 @@ jobs:
|
|||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
|
|
@ -39,7 +42,7 @@ jobs:
|
|||
run: curl -L https://wokwi.com/ci/install.sh | sh
|
||||
|
||||
- name: Test on Wokwi
|
||||
run: pytest ${{ matrix.test }}.py --junitxml=report.xml
|
||||
run: pytest tests/${{ matrix.test }}.py --junitxml=report.xml -v
|
||||
env:
|
||||
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}
|
||||
|
||||
|
|
@ -48,4 +51,4 @@ jobs:
|
|||
if: always()
|
||||
with:
|
||||
files: |
|
||||
test-results/**/*.xml
|
||||
/home/runner/work/Adafruit_Wippersnapper_Arduino/Adafruit_Wippersnapper_Arduino/report.xml
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -54,4 +54,7 @@ tests/__pycache__/
|
|||
|
||||
# These sometimes contain credentials, don't commit them!
|
||||
src/Wippersnapper_demo_wokwi.ino
|
||||
data/
|
||||
data/
|
||||
|
||||
# Test results
|
||||
report.xml
|
||||
|
|
@ -21,19 +21,19 @@ def run_wokwi_cli(binary, timeout, scenario, diagram):
|
|||
return result
|
||||
|
||||
def test_invalid_json():
|
||||
result = run_wokwi_cli(f"bin/offline/firmware.elf", "120000", f"scenarios/offline/test-invalid-json.scenario.yaml", f"diagrams/offline.json")
|
||||
result = run_wokwi_cli(f"tests/bin/offline/firmware.elf", "120000", f"tests/scenarios/offline/test-invalid-json.scenario.yaml", f"tests/diagrams/offline.json")
|
||||
assert result.returncode == 0
|
||||
|
||||
|
||||
def test_analog_input():
|
||||
result = run_wokwi_cli(f"bin/offline/firmware.elf", "120000", f"scenarios/offline/test-log-analogin.scenario.yaml", f"diagrams/offline.json")
|
||||
result = run_wokwi_cli(f"tests/bin/offline/firmware.elf", "120000", f"tests/scenarios/offline/test-log-analogin.scenario.yaml", f"tests/diagrams/offline.json")
|
||||
assert result.returncode == 0
|
||||
|
||||
|
||||
def test_digital_input():
|
||||
result = run_wokwi_cli(f"bin/offline/firmware.elf", "120000", f"scenarios/offline/test-log-digital-in.scenario.yaml", f"diagrams/offline.json")
|
||||
result = run_wokwi_cli(f"tests/bin/offline/firmware.elf", "120000", f"tests/scenarios/offline/test-log-digital-in.scenario.yaml", f"tests/diagrams/offline.json")
|
||||
assert result.returncode == 0
|
||||
|
||||
def test_ds18b20():
|
||||
result = run_wokwi_cli(f"bin/offline/firmware.elf", "120000", f"scenarios/offline/test-log-ds18b20.scenario.yaml", f"diagrams/offline.json")
|
||||
result = run_wokwi_cli(f"tests/bin/offline/firmware.elf", "120000", f"tests/scenarios/offline/test-log-ds18b20.scenario.yaml", f"tests/diagrams/offline.json")
|
||||
assert result.returncode == 0
|
||||
Loading…
Reference in a new issue