Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance github actions files #7

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gritaro
17 changes: 17 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
92 changes: 92 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
# See https://docs.github.com/en/rest/reference/repos#update-a-repository for all available settings.

# The name of the repository. Changing this will rename the repository
name: gigachat

# A short description of the repository that will show up on GitHub
description: This custom component for Home Assistant allows you to generate text responses using GigaChain LLM framework (like GigaChat or YandexGPT and ChatGPT).

# A URL with more information about the repository
homepage: https://github.com/gritaro/gigachat

# A comma-separated list of topics to set on the repository
topics: openai, gpt, homeassistant, voice-assistant, hacs-integration, chatgpt, yandexgpt, gigachat, gigachain, langchain

# Either `true` to make the repository private, or `false` to make it public.
private: false

# Either `true` to enable issues for this repository, `false` to disable them.
has_issues: true

# Either `true` to enable projects for this repository, or `false` to disable them.
# If projects are disabled for the organization, passing `true` will cause an API error.
has_projects: false

# Either `true` to enable the wiki for this repository, `false` to disable it.
has_wiki: false

# Either `true` to enable downloads for this repository, `false` to disable them.
#has_downloads: false

# Updates the default branch for this repository.
default_branch: main

# Either `true` to allow squash-merging pull requests, or `false` to prevent
# squash-merging.
allow_squash_merge: true
use_squash_pr_title_as_default: true

# Either `true` to allow merging pull requests with a merge commit, or `false`
# to prevent merging pull requests with merge commits.
allow_merge_commit: false

# Either `true` to allow rebase-merging pull requests, or `false` to prevent
# rebase-merging.
allow_rebase_merge: true

# Either `true` to enable automatic deletion of branches on merge, or `false` to disable
delete_branch_on_merge: true

# Either `true` to enable automated security fixes, or `false` to disable
# automated security fixes.
#enable_automated_security_fixes: true

# Either `true` to enable vulnerability alerts, or `false` to disable
# vulnerability alerts.
enable_vulnerability_alerts: true

# Labels: define labels for Issues and Pull Requests
labels:
- name: "Feature Request"
color: "00ffbb"

- name: "Bug"
color: "e30000"

- name: "Wont Fix"
color: "ffffff"

- name: "Enhancement"
color: "48ff00"

- name: "Documentation"
color: "0077ff"

- name: "User Assistance"
color: "0077ff"

- name: "Stale"
color: "ffffff"

- name: "Help needed"
color: "fbca04"

- name: "dependencies"
color: "000000"

- name: "github_actions"
color: "000000"

21 changes: 21 additions & 0 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cron HACS actions

on:
schedule:
- cron: "0 0 * * *"

jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/[email protected]"

- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
ignore: brands

- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"
17 changes: 0 additions & 17 deletions .github/workflows/hacs.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/hassfest.yaml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Pull actions

on:
pull_request:

env:
PYTHON_VERSION: "3.10"

jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/[email protected]"

- 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/[email protected]"
- uses: "actions/[email protected]"
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: python3 -m pip install black
- run: black .

# tests:
# runs-on: "ubuntu-latest"
# name: Run tests
# steps:
# - name: Check out code from GitHub
# uses: "actions/[email protected]"
# - name: Setup Python
# uses: "actions/[email protected]"
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Install requirements
# run: |
# python3 -m pip install -r requirements.txt
# python3 -m pip install -r requirements_test.txt
# - name: Run tests
# run: |
# pytest \
# -qq \
# --timeout=9 \
# --durations=10 \
# -n auto \
# --cov custom_components.gigachat \
# -o console_output_style=count \
# -p no:sugar \
# tests
63 changes: 63 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Push actions

on:
push:
branches:
- main
- rc-*

env:
PYTHON_VERSION: "3.10"

jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/[email protected]"

- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
ignore: brands

- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"

style:
runs-on: "ubuntu-latest"
name: Check style formatting
steps:
- uses: "actions/[email protected]"
- uses: "actions/[email protected]"
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: python3 -m pip install black
- run: black .

# tests:
# runs-on: "ubuntu-latest"
# name: Run tests
# steps:
# - name: Check out code from GitHub
# uses: "actions/[email protected]"
# - name: Setup Python
# uses: "actions/[email protected]"
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Install requirements
# run: |
# python3 -m pip install -r requirements.txt
# python3 -m pip install -r requirements_test.txt
# - name: Run tests
# run: |
# pytest \
# -qq \
# --timeout=9 \
# --durations=10 \
# -n auto \
# --cov custom_components.gigachat \
# -o console_output_style=count \
# -p no:sugar \
# tests
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest-homeassistant-custom-component
Loading