Skip to content

Validate plugwise-beta against HA-core dev #136

Validate plugwise-beta against HA-core dev

Validate plugwise-beta against HA-core dev #136

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Validate plugwise-beta against HA-core dev
env:
# Uses a different key/restore key than test.yml
CACHE_VERSION: 2
DEFAULT_PYTHON: "3.13"
PRE_COMMIT_HOME: ~/.cache/pre-commit
VENV: venv
on:
workflow_dispatch:
# Only set to 'push' when testing/modifying
# otherwise this should be just scheduled runs!
# push:
# Schedule Weekly at 9
schedule:
- cron: "0 9 * * 3"
jobs:
# Determine cache key once
cache:
runs-on: ubuntu-latest
name: Cache identify
outputs:
cache-key: ${{ steps.set-key.outputs.cache-key }}
python-version: ${{ steps.python.outputs.python-version }} # Ensure all runners use THIS minor version
steps:
- name: Check out committed code
uses: actions/checkout@v6
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v6
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Fetch HA pyproject
id: core-version
run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml"
- name: Compute cache key
id: set-key
run: echo "cache-key=${{ runner.os }}-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml', 'ha_pyproject.toml') }}-dev-branch" >> "$GITHUB_OUTPUT"
# Prepare default python version environment
ha-core-prepare:
runs-on: ubuntu-latest
needs: cache
name: Prepare
steps:
- name: Prepare code checkout and python/pre-commit setup
id: cache-reuse
uses: plugwise/gh-actions/prepare-python-and-code@v1
with:
cache-key: ${{ needs.cache.outputs.cache-key }}
fail-on-miss: false # First time create cache (if not already exists)
python-version: ${{ needs.cache.outputs.python-version }}
venv-dir: ${{ env.VENV }}
precommit-home: ${{ env.PRE_COMMIT_HOME }}
clone-core: "true"
- name: Test against HA-core DEV (for active or upcoming RC/Beta)
run: |
GITHUB_ACTIONS="" BRANCH="dev" scripts/core-testing.sh
- name: Create failure issue as warning
if: failure()
uses: imjohnbo/issue-bot@v3
with:
# include any handles without @
# assignees: "plugwise/plugwise-smile"
labels: "core-dev-compat"
pinned: false
# closes existing issue if all labels match
close-previous: true
title: Next Home Assistant version incompatibility
body: "**Note: This does not affect users of the plugwise integration in Core nor Plugwise-Beta users on the latest version of Home Assistant.** For our beloved {{ assignees }}, please check action logs, it seems our current code is not compatible with the upcoming version (and/or Release Candidate (RC)/beta) of Home Assistant in a timely matter to conform before the next monthly release. See details at https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"