Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Use ha-blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow authored Oct 13, 2020
1 parent d691122 commit 734fa19
Showing 1 changed file with 18 additions and 53 deletions.
71 changes: 18 additions & 53 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,30 @@
name: Validate

name: "Validation And Formatting"
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

- cron: '0 0 * * *'
jobs:
validate_hacs:
name: HACS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate
uses: hacs/integration/action@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CATEGORY: integration
validate_hassfest:
name: Hassfest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate
uses: home-assistant/actions/hassfest@master
test_advice_flake8:
name: Test + advice with flake8
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Download repo
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
- uses: actions/setup-python@v2
name: Setup Python
- uses: actions/cache@v2
name: Cache
with:
path: |
~/.cache/pip
key: custom-component-ci
- uses: hacs/integration/action@main
with:
python-version: 3.8
- name: Cache
uses: actions/cache@v2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CATEGORY: integration
- uses: KTibow/ha-blueprint@stable
name: CI
with:
path: ~/.cache/pip
key: pip-flake8
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade flake8 wemake-python-styleguide
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Don't mind this
run: |
flake8 . --inline-quotes '"' --count --exit-zero --max-complexity=15 --max-line-length=90 --statistics --select=I,P,WPS305,C812,E203,W503,E800
- name: Docstrings
run: |
flake8 . --inline-quotes '"' --count --exit-zero --max-complexity=15 --max-line-length=90 --statistics --select=D,DAR
- name: Unused stuff
run: |
echo "Some stuff may not be used, but is used in commented out code."
echo "Make sure you check with the find command before you remove anything!"
flake8 . --inline-quotes '"' --count --exit-zero --max-complexity=15 --max-line-length=90 --statistics --select=F
echo "Some stuff may not be used, but is used in commented out code."
echo "Make sure you check with the find command before you remove anything!"
- name: General stats
run: |
flake8 . --inline-quotes '"' --count --exit-zero --max-complexity=15 --max-line-length=90 --statistics --ignore=I,P,WPS305,C812,E203,W503,E800,D,DAR,F
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 734fa19

Please sign in to comment.