Updated ics_calendar.

This commit is contained in:
2026-03-06 01:30:59 +01:00
parent c9807a7bf0
commit e504cdf90c
18 changed files with 234 additions and 17 deletions

View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Home Assistant Setup**
Please indicate your version of HA and how it is installed.
Version:
Installation Type (put an X between the square brackets for your HA):
[] Home Assistant OS
[] Home Assistant Supervised
[] Home Assistant Container
[] Home Assistant Core
Hardware platform:
[] ARM
[] x86-64
Are you running in a container environment like Docker or Kubernetes?
[] Yes
[] No
If running in a container, how is your image built?
[] Official HA container image
[] Official HA container image with customizations
[] Custom built container image
**Describe the bug**
A clear and concise description of the bug

View File

@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
day: "monday"
reviewers:
- "franc6"

View File

@@ -0,0 +1,10 @@
Fixes #
Description of change:
## Formatting, testing, and code coverage
Please note your pull request won't be accepted if you haven't properly formatted your source code, and ensured the unit tests are appropriate. Please note if you are not running on Windows, you can either run the scripts via a bash installation (like git-bash).
- [] formatstyle.sh reports no errors
- [] All unit tests pass (test.sh)
- [] Code coverage has not decreased (test.sh)

View File

@@ -0,0 +1,21 @@
name: Validate with hassfest and run HACS action
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: "actions/checkout@v4"
- name: Validate with hassfest
uses: "home-assistant/actions/hassfest@master"
- name: HACS Action
uses: "hacs/action@main"
with:
category: integration

View File

@@ -0,0 +1,46 @@
name: Lint
on:
pull_request:
branches: [releases]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.20"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install dependencies
run: |
uv sync --prerelease=allow --dev --extra tests
- name: Run isort --check
run: |
uv run --prerelease=allow isort --check custom_components/ics_calendar tests
- name: Run black --check
run: |
uv run --prerelease=allow black --check custom_components/ics_calendar tests
- name: Run flake8
run: |
uv run --prerelease=allow flake8
- name: Run pydocstyle
run: |
uv run --prerelease=allow pydocstyle -v custom_components/ics_calendar tests
- name: Run pylint
run: |
uv run --prerelease=allow pylint custom_components/ics_calendar

View File

@@ -0,0 +1,44 @@
name: Run Tests
on:
push:
branches: [releases]
pull_request:
branches: [releases]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set timezone
run: |
sudo timedatectl set-timezone America/New_York
timedatectl
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.20"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install dependencies
run: |
uv sync --prerelease=allow --extra tests
- name: Run pytest
run: |
PYTHONDONTWRITEBYTECODE=1 uv run --prerelease=allow pytest tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}