Skip to content

Push actions

Push actions #452

Workflow file for this run

name: Push actions
on:
pull_request:
push:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/checkout@v4"
- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"
style:
runs-on: "ubuntu-latest"
name: Check style formatting
steps:
- uses: "actions/checkout@v4"
- uses: actions/setup-python@v4
with:
python-version: 3.9
- run: python3 -m pip install black
- run: black .
tests:
runs-on: "ubuntu-latest"
name: Run tests
strategy:
matrix:
# python-version:
# - 3.11
# pytest-homeassistant-custom-component-version:
# - 0.13.36
include:
- python-version: 3.9
pytest-homeassistant-custom-component-version: 0.12.29
- python-version: "3.10"
pytest-homeassistant-custom-component-version: 0.12.29
- python-version: 3.11
pytest-homeassistant-custom-component-version: 0.12.29
- python-version: "3.10"
pytest-homeassistant-custom-component-version: 0.12.52
- python-version: "3.10"
pytest-homeassistant-custom-component-version: 0.12.57
- python-version: "3.10"
pytest-homeassistant-custom-component-version: 0.13.0
- python-version: "3.10"
pytest-homeassistant-custom-component-version: 0.13.32
- python-version: "3.11"
pytest-homeassistant-custom-component-version: 0.13.36
- python-version: "3.12"
pytest-homeassistant-custom-component-version: 0.13.99
- python-version: "3.12"
pytest-homeassistant-custom-component-version: 0.13.111
steps:
- name: Check out code from GitHub
uses: "actions/checkout@v4"
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
sed -i 's/pytest-homeassistant-custom-component==[0-9]*\.[0-9]*\.[0-9]*/pytest-homeassistant-custom-component==${{ matrix.pytest-homeassistant-custom-component-version }}/g' requirements_test.txt
python3 -m pip install -r requirements_test.txt
- name: Run tests
run: |
pytest \
-qq \
--timeout=35 \
--durations=10 \
-n auto \
--cov custom_components.vaillant_plus \
-o console_output_style=count \
-p no:sugar \
tests
coverage lcov
- name: Upload Coverage Results
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
parallel: true
flag-name: run-${{ join(matrix.*, ' - ') }}
finish:
needs: tests
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
#carryforward: "run-3.9,run-3.10,run-3.11"