-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some github actions. Remove some unused imports.
- Loading branch information
Showing
8 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI actions | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
ruff: | ||
name: "Ruff" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout the repository" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "pip" | ||
|
||
- name: "Install requirements" | ||
run: python3 -m pip install -r requirements-dev.txt | ||
|
||
- name: "Run" | ||
run: python3 -m ruff check . | ||
|
||
tests: | ||
runs-on: "ubuntu-latest" | ||
name: Run tests | ||
steps: | ||
- name: Check out code from GitHub | ||
uses: "actions/checkout@v4" | ||
- name: Setup Python | ||
uses: "actions/setup-python@v5" | ||
with: | ||
python-version: "3.12" | ||
- name: Install requirements | ||
run: python3 -m pip install -r requirements-dev.txt | ||
- name: Run tests | ||
run: | | ||
pytest --cov=./ --cov-report=xml | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-r requirements.txt | ||
pytest-homeassistant-custom-component==0.13.115 | ||
ruff==0.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Test weenect setup process.""" | ||
|
||
|
||
# TODO | ||
async def test_setup_hub(hass): | ||
# TODO: Implement the actual test logic | ||
assert 1 == 1 | ||
|
||
|
||
async def test_setup_vedo(hass): | ||
# TODO: Implement the actual test logic | ||
assert 1 == 1 |