generated from ludeeus/integration_blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dermotduffy/miserable-blackbird
Add CI
- Loading branch information
Showing
2 changed files
with
29 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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
name: "Validate" | ||
name: "CI" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.12" | ||
|
||
jobs: | ||
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest | ||
name: "Hassfest Validation" | ||
|
@@ -35,3 +36,26 @@ jobs: | |
category: "integration" | ||
# Remove this 'ignore' key when you have added brand images for your integration to https://github.com/home-assistant/brands | ||
ignore: "brands" | ||
|
||
tests: | ||
runs-on: "ubuntu-latest" | ||
name: Run tests | ||
steps: | ||
- name: Check out code from GitHub | ||
uses: "actions/[email protected]" | ||
- name: Setup Python ${{ env.DEFAULT_PYTHON }} | ||
uses: "actions/[email protected]" | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
- name: Install requirements | ||
run: | | ||
pip install pip | ||
pip install -r requirements_test.txt | ||
- name: Tests suite | ||
run: | | ||
pytest -p no:sugar | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
env_vars: OS,PYTHON | ||
verbose: true |
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