diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0860cba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Run Python Tests +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Python 3 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install markdown pdoc3 webencodings pyparsing twine autopep8 pylint pytest + - name: Run pylint + run: pylint --exit-zero meshtastic + - name: Run tests with pytest + run: pytest diff --git a/.gitignore b/.gitignore index 5f5eeb9..f414903 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dist log_* .eggs nanopb-0.4.4 +.*swp diff --git a/README.md b/README.md index 3eee433..17a2f3f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Meshtastic-python [![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/meshtastic/Meshtastic-python) +![Unit Tests](https://github.com/meshtastic/Meshtastic-python/actions/workflows/ci.yml/badge.svg) + A python client for using [Meshtastic](https://www.meshtastic.org) devices. This small library (and example application) provides an easy API for sending and receiving messages over mesh radios. It also provides access to any of the operations/data available in the device user interface or the Android application. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in. diff --git a/meshtastic/test/.test_node.py.swp b/meshtastic/test/.test_node.py.swp deleted file mode 100644 index 1df257b..0000000 Binary files a/meshtastic/test/.test_node.py.swp and /dev/null differ