diff --git a/.github/workflows/_validate.bak b/.github/workflows/_validate.bak new file mode 100644 index 0000000..df59ded --- /dev/null +++ b/.github/workflows/_validate.bak @@ -0,0 +1,19 @@ +name: Validate with HACS + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 5 * * 6' + +jobs: + validate-hacs: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - name: HACS validation + uses: "hacs/action@main" + with: + category: "integration" + diff --git a/.github/workflows/hassfest.yaml b/.github/workflows/hassfest.yaml new file mode 100644 index 0000000..21a14df --- /dev/null +++ b/.github/workflows/hassfest.yaml @@ -0,0 +1,16 @@ +name: Validate with hassfest + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 6 * * 6' + +jobs: + validate-hassfest: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - name: HA validation + uses: "home-assistant/actions/hassfest@master" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d0084f0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: "Lint the code" + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 5 * * 6' + +jobs: + ruff: + name: "Ruff" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout the repository" + uses: "actions/checkout@main" + + - name: "Set up Python" + uses: actions/setup-python@main + with: + python-version: "3.12" + cache: "pip" + + - name: "Install requirements" + run: python3 -m pip install -r requirements.txt + + - name: "Run Ruff" + run: python3 -m ruff check . diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 0000000..963cb60 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,22 @@ +name: 'Close stale issues and PR' +on: + schedule: + - cron: '01 2 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 8 days.' + stale-pr-message: 'This PR is stale because it has been open 45 days with no activity.' + close-issue-message: 'This issue was closed because it has been stalled for 15 days with no activity.' + exempt-issue-labels: 'bug' + exempt-all-assignees: true + days-before-stale: 45 + days-before-close: 15 + days-before-pr-close: -1 diff --git a/custom_components/hunterdouglas_powerview_ble/manifest.json b/custom_components/hunterdouglas_powerview_ble/manifest.json index e55df72..f896bb7 100644 --- a/custom_components/hunterdouglas_powerview_ble/manifest.json +++ b/custom_components/hunterdouglas_powerview_ble/manifest.json @@ -16,5 +16,5 @@ "issue_tracker": "https://github.com/patman15/hdpv_ble/issues", "loggers": ["hunterdouglas_powerview_ble"], "requirements": ["cryptography>=43.0.0"], - "version": 0.21 + "version": "0.21" } diff --git a/requirements.txt b/requirements.txt index fd1987d..bf8d48b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -homeassistant==2024.8.0 +homeassistant==2024.11.0 pip>=21.3.1 ruff==0.6.8 diff --git a/requirements_test.txt b/requirements_test.txt index ef103e2..3ca9df3 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,13 +1,13 @@ -pip>=21.3.1 -homeassistant==2024.6.0 +-r requirements.txt + wheel home-assistant-bluetooth -habluetooth>=2.4.0 +habluetooth>=3.6.0 bluetooth-adapters -pytest>=8.0.2 -pytest-cov>=4.0.0 -pytest-socket>=0.5.0 -pytest-asyncio +pytest>=8.3.3 +pytest-cov>=5.0.0 +pytest-socket>=0.7.0 +pytest-asyncio>=0.24.0 sqlalchemy freezegun requests-mock @@ -16,10 +16,10 @@ aiohttp aiohttp_cors aiohttp-fast-url-dispatcher aiohttp-zlib-ng -bleak>=0.19.0 -bleak-retry-connector>=3.3.0 +bleak>=0.22.3 +bleak-retry-connector>=3.6.0 bluetooth-data-tools pyserial-asyncio pyudev -pytest-homeassistant-custom-component==0.13.132 +pytest-homeassistant-custom-component==0.13.181