Added github workflow intent
This commit is contained in:
21
.github/workflows/cron.yaml
vendored
Normal file
21
.github/workflows/cron.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Cron actions
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Validate
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v2"
|
||||||
|
|
||||||
|
- name: HACS validation
|
||||||
|
uses: "hacs/action@main"
|
||||||
|
with:
|
||||||
|
category: "integration"
|
||||||
|
ignore: brands
|
||||||
|
|
||||||
|
- name: Hassfest validation
|
||||||
|
uses: "home-assistant/actions/hassfest@master"
|
||||||
55
.github/workflows/pull.yml
vendored
Normal file
55
.github/workflows/pull.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Pull actions
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Validate
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v2"
|
||||||
|
|
||||||
|
- name: HACS validation
|
||||||
|
uses: "hacs/action@main"
|
||||||
|
with:
|
||||||
|
category: "integration"
|
||||||
|
ignore: brands
|
||||||
|
|
||||||
|
- name: Hassfest validation
|
||||||
|
uses: "home-assistant/actions/hassfest@master"
|
||||||
|
|
||||||
|
style:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Check style formatting
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v2"
|
||||||
|
- uses: "actions/setup-python@v1"
|
||||||
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
- run: python3 -m pip install black
|
||||||
|
- run: black .
|
||||||
|
|
||||||
|
tests:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Run tests
|
||||||
|
steps:
|
||||||
|
- name: Check out code from GitHub
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
- name: Setup Python
|
||||||
|
uses: "actions/setup-python@v1"
|
||||||
|
with:
|
||||||
|
python-version: "3.8"
|
||||||
|
- name: Install requirements
|
||||||
|
run: python3 -m pip install -r requirements_test.txt
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
pytest \
|
||||||
|
-qq \
|
||||||
|
--timeout=9 \
|
||||||
|
--durations=10 \
|
||||||
|
-n auto \
|
||||||
|
--cov custom_components.integration_blueprint \
|
||||||
|
-o console_output_style=count \
|
||||||
|
-p no:sugar \
|
||||||
|
tests
|
||||||
58
.github/workflows/push.yml
vendored
Normal file
58
.github/workflows/push.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
name: Push actions
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Validate
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v2"
|
||||||
|
|
||||||
|
- name: HACS validation
|
||||||
|
uses: "hacs/action@main"
|
||||||
|
with:
|
||||||
|
category: "integration"
|
||||||
|
ignore: brands
|
||||||
|
|
||||||
|
- name: Hassfest validation
|
||||||
|
uses: "home-assistant/actions/hassfest@master"
|
||||||
|
|
||||||
|
style:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Check style formatting
|
||||||
|
steps:
|
||||||
|
- uses: "actions/checkout@v2"
|
||||||
|
- uses: "actions/setup-python@v1"
|
||||||
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
- run: python3 -m pip install black
|
||||||
|
- run: black .
|
||||||
|
|
||||||
|
tests:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
name: Run tests
|
||||||
|
steps:
|
||||||
|
- name: Check out code from GitHub
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
- name: Setup Python
|
||||||
|
uses: "actions/setup-python@v1"
|
||||||
|
with:
|
||||||
|
python-version: "3.8"
|
||||||
|
- name: Install requirements
|
||||||
|
run: python3 -m pip install -r requirements_test.txt
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
pytest \
|
||||||
|
-qq \
|
||||||
|
--timeout=9 \
|
||||||
|
--durations=10 \
|
||||||
|
-n auto \
|
||||||
|
--cov custom_components.integration_blueprint \
|
||||||
|
-o console_output_style=count \
|
||||||
|
-p no:sugar \
|
||||||
|
tests
|
||||||
Reference in New Issue
Block a user