Skip to content

Commit

Permalink
Add GitHub action for running our tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalle19 committed Sep 13, 2024
1 parent 0615161 commit 0b2d56c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruff
name: Linting
on:
push:
branches: [ main ]
Expand All @@ -9,4 +9,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@v1
22 changes: 22 additions & 0 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b2d56c

Please sign in to comment.