Skip to content

Commit

Permalink
Add GitHub actions for linting and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalle19 committed Feb 7, 2025
1 parent 874ddd4 commit 75dc03c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Linting
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- name: Run tests
run: |
python -m unittest discover -s tests/ -v

0 comments on commit 75dc03c

Please sign in to comment.