Skip to content

Implement include area in config flow for group (#1747) #1105

Implement include area in config flow for group (#1747)

Implement include area in config flow for group (#1747) #1105

Workflow file for this run

name: Format code
on:
push:
branches:
- master
jobs:
format:
name: Format with black and isort
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ env.POETRY_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: cache dependencies
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- name: Pull again
run: git pull || true
- name: Run formatting
run: |
source .venv/bin/activate \
python -m black -v .
- name: Commit files
run: |
if [ $(git diff HEAD | wc -l) -gt 30 ]
then
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"
git commit -m "Run formatting" -a || true
git push || true
fi