Skip to content

Merge pull request #722 from plugwise/improve-tests #3426

Merge pull request #722 from plugwise/improve-tests

Merge pull request #722 from plugwise/improve-tests #3426

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: Test against HA-core (master/released)
env:
CACHE_VERSION: 27
DEFAULT_PYTHON: "3.12"
on:
workflow_dispatch:
push:
# pull_request:
jobs:
# Prepare default python version environment
ha-core-prepare:
runs-on: ubuntu-latest
name: Setup for HA-core (release)
steps:
- name: Check out committed code
uses: actions/checkout@v4.1.7
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base HA-core Python ${{ env.DEFAULT_PYTHON }} environment
id: cache-hacore
uses: actions/cache@v4
env:
cache-name: cache-hacore
with:
path: ./
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore-${{
steps.python.outputs.python-version }}-${{
hashFiles('./custom_components/plugwise/manifest.json') }}-${{
hashFiles('./ha-core/.git/plugwise-tracking') }}
restore-keys: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore-${{ steps.python.outputs.python-version }}-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore
${{ env.CACHE_VERSION}}-${{ runner.os }}
${{ env.CACHE_VERSION}}
- name: Test through HA-core (master/release)
run: |
GITHUB_ACTIONS="" BRANCH="master" scripts/core-testing.sh
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master