diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml index 68bfa4a..d84e31b 100644 --- a/.github/workflows/ruff.yaml +++ b/.github/workflows/ruff.yaml @@ -1,4 +1,4 @@ -name: Ruff +name: Linting on: push: branches: [ main ] @@ -9,4 +9,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1 \ No newline at end of file + - uses: chartboost/ruff-action@v1 diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml new file mode 100644 index 0000000..4156e4c --- /dev/null +++ b/.github/workflows/unittest.yaml @@ -0,0 +1,22 @@ +name: Tests +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + unittest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install homeassistant bidict + - name: Run tests + run: | + python -m unittest discover -s tests/ -v diff --git a/README.md b/README.md index 0791c86..1d11e30 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ Obviously not every single feature can be controlled, only the basics: The communication is done using Python's `asyncio` and requires no external libraries +## Development + +### Tests + +```bash +python3 -m unittest discover -s tests/ -v +``` + ## License GNU GENERAL PUBLIC LICENSE version 3