Skip to content

Home Assistant custom component #909

Home Assistant custom component

Home Assistant custom component #909

Workflow file for this run

name: Test Councils
on:
push:
# Trigger unless only the wiki directory changed
paths-ignore:
- "wiki/**"
- "**/**.md"
branches: [ "master" ]
pull_request:
# Trigger unless only the wiki directory changed
paths-ignore:
- "wiki/**"
- "**/**.md"
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', 3.11]
poetry-version: [1.5.1]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install
run: make install
- name: run integration-tests
run: make matrix=${{ matrix.python-version }} integration-tests
continue-on-error: true
- name: run unit-tests
run: make unit-tests
continue-on-error: true
- name: Upload Test Coverage to Codecov
uses: codecov/codecov-action@v3
with:
gcov_ignore: uk_bin_collection/tests/**
- name: Get Allure history
uses: actions/checkout@v4
if: github.ref == 'refs/heads/master'
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action from marketplace
uses: simple-elf/allure-report-action@master
if: github.ref == 'refs/heads/master'
#id: allure-report
with:
allure_results: build/${{ matrix.python-version }}/allure-results
#gh_pages: gh-pages
#allure_report: allure-report
subfolder: ${{ matrix.python-version }}
allure_history: allure-history
keep_reports: 20
- name: Tar Report
if: github.ref == 'refs/heads/master'
run: tar -cvf allure_history_${{ matrix.python-version }}.tar allure-history/${{ matrix.python-version }}
- name: upload artifact
uses: actions/upload-artifact@v3
if: github.ref == 'refs/heads/master'
with:
name: allure_history
path: allure_history_${{ matrix.python-version }}.tar
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
name: allure_history
path: allure-history/tars
- name: Untar Reports
run: for i in allure-history/tars/*.tar; do tar -xvf "$i" allure-history ;done
- name: Remove Tar Reports
run: rm -rf allure-history/tars
- name: Display structure of downloaded files
run: ls -R
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history