-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit setup, SVG icon, HACS configuration
- Loading branch information
Showing
10 changed files
with
234 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,52 @@ | ||
--- | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
env: | ||
LOG_TO_CS: .github/logToCs.py | ||
RAW_LOG: pre-commit.log | ||
CS_XML: pre-commit.xml | ||
steps: | ||
- run: sudo apt-get update && sudo apt-get install cppcheck | ||
if: false | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
if: false | ||
with: | ||
cache: pip | ||
python-version: 3.12.1 | ||
- run: python -m pip install pre-commit | ||
- uses: actions/cache/restore@v4 | ||
with: | ||
path: ~/.cache/pre-commit/ | ||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') | ||
}} | ||
- name: Run pre-commit hooks | ||
run: | | ||
set -o pipefail | ||
pre-commit gc | ||
pre-commit run --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG} | ||
- name: Convert Raw Log to Annotations | ||
uses: mdeweerd/[email protected] | ||
if: ${{ failure() }} | ||
with: | ||
in: ${{ env.RAW_LOG }} | ||
- uses: actions/cache/save@v4 | ||
if: ${{ always() }} | ||
with: | ||
path: ~/.cache/pre-commit/ | ||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') | ||
}} | ||
- name: Provide log as artifact | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ always() }} | ||
with: | ||
name: precommit-logs | ||
path: | | ||
${{ env.RAW_LOG }} | ||
${{ env.CS_XML }} | ||
retention-days: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Validate with hassfest | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: home-assistant/actions/hassfest@master | ||
hacs: | ||
name: HACS Action | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: HACS Action | ||
uses: hacs/action@main | ||
with: | ||
category: integration |
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,8 @@ | ||
{ | ||
"name": "Delorian - Testing integration for historical sensors", | ||
"content_in_root": false, | ||
"zip_release": false, | ||
"render_readme": true, | ||
"persistent_directory": "local", | ||
"homeassistant": "2023.1" | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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