github: CI: add black #2
Workflow file for this run
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
name: CI | |
on: | |
- push | |
- pull_request | |
env: | |
DEFAULT_PYTHON: "3.12" | |
jobs: | |
black: | |
name: Check Black | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code from GitHub | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
pip --version | |
- name: Install Black | |
run: | | |
pip install black | |
- name: Run Black | |
run: | | |
black --check --diff homeconnect | |
ruff: | |
name: Check ruff | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code from GitHub | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
pip --version | |
- name: Install ruff | |
run: | | |
pip install ruff | |
- name: Run ruff | |
run: | | |
ruff check homeconnect |