Skip to content

V6 rewrite

V6 rewrite #353

Workflow file for this run

name: Code Standards
on:
push:
paths:
- "**.py"
- "pyproject.toml"
pull_request:
branches:
- master
- dev
paths:
- "**.py"
- "pyproject.toml"
workflow_dispatch:
jobs:
code_styling:
name: "Code Styling"
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install Dependencies
run: uv sync --group dev
- name: Run Ruff format
run: uv run ruff format homeassistant_api
- name: Run Ruff linting
run: uv run ruff check homeassistant_api
- name: Run Zuban
run: uv run zuban check homeassistant_api
code_functionality:
name: "Code Functionality"
runs-on: ubuntu-latest
environment: "Test Suite"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Pre Docker Setup
run: |
mkdir volumes/coverage
- name: Run Test Environment
run: |
docker compose up --build --exit-code-from tests
env:
HOMEASSISTANTAPI_TOKEN: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMDE4YjQ4YzMyZTE0ODNhYjY2ZWQzOTZmYzg3ZDAyNiIsImlhdCI6MTY3ODU3NDUwMSwiZXhwIjoxOTkzOTM0NTAxfQ.fyhnfwpont4uE0gn46_Ut_pPmyn4QWv0MDaVAei2PPk" # This is non-sensitive data
- name: Post Docker Setup
run: |
sudo chown -R $USER volumes
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./volumes/coverage/coverage.xml
verbose: true