chore: Build version to v0.0.1` (#32) #52
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
env: | |
DEFAULT_PYTHON: "3.12" | |
jobs: | |
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest | |
name: "Hassfest Validation" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout the repository" | |
uses: "actions/[email protected]" | |
- name: "Run hassfest validation" | |
uses: "home-assistant/actions/hassfest@master" | |
hacs: # https://github.com/hacs/action | |
name: "HACS Validation" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout the repository" | |
uses: "actions/[email protected]" | |
- name: "Run HACS validation" | |
uses: "hacs/action@main" | |
with: | |
category: "integration" | |
tests: | |
runs-on: "ubuntu-latest" | |
name: Tests | |
steps: | |
- name: Check out code from GitHub | |
uses: "actions/[email protected]" | |
- name: Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: "actions/[email protected]" | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Set up poetry | |
uses: snok/[email protected] | |
- name: "Set up dependencies" | |
run: poetry install --no-interaction | |
- name: Tests suite | |
run: | | |
poetry run pytest -p no:sugar | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS,PYTHON | |
verbose: true | |
lint: | |
runs-on: "ubuntu-latest" | |
name: Lint | |
steps: | |
- name: Check out code from GitHub | |
uses: "actions/[email protected]" | |
- name: Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: "actions/[email protected]" | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Set up poetry | |
uses: snok/[email protected] | |
- name: "Set up dependencies" | |
run: poetry install --no-interaction | |
- name: "Lint" | |
run: poetry run ruff check . | |
- name: "Format" | |
run: poetry run ruff format . --check | |
mypy: | |
runs-on: "ubuntu-latest" | |
name: Typing | |
steps: | |
- name: Check out code from GitHub | |
uses: "actions/[email protected]" | |
- name: Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: "actions/[email protected]" | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Set up poetry | |
uses: snok/[email protected] | |
- name: "Set up dependencies" | |
run: poetry install --no-interaction | |
- name: "mypy" | |
run: poetry run mypy -p custom_components.hass_web_proxy |