Updated ics_calendar.
This commit is contained in:
21
custom_components/ics_calendar/.github/workflows/hacs.yaml
vendored
Normal file
21
custom_components/ics_calendar/.github/workflows/hacs.yaml
vendored
Normal 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
|
||||
46
custom_components/ics_calendar/.github/workflows/lint.yaml
vendored
Normal file
46
custom_components/ics_calendar/.github/workflows/lint.yaml
vendored
Normal 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
|
||||
44
custom_components/ics_calendar/.github/workflows/runtests.yaml
vendored
Normal file
44
custom_components/ics_calendar/.github/workflows/runtests.yaml
vendored
Normal 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 }}
|
||||
|
||||
Reference in New Issue
Block a user