Adds build steps

This commit is contained in:
ludeeus
2019-10-10 15:27:32 +00:00
parent 17e53209e4
commit 07c36d88a1
5 changed files with 27 additions and 11 deletions

View File

@ -36,6 +36,11 @@ jobs:
cp /tmp/lokalise/locale/* custom_components/hacs/.translations/
# Build Frontend
- name: Build the HACS frontend
run: npm run build
# Pack the HACS dir as a zip and upload to the release
- name: ZIP HACS Dir
run: "zip hacs.zip -r custom_components/hacs"

View File

@ -1,4 +1,4 @@
name: Test with Home Assistant
name: Test
on:
pull_request:
@ -9,8 +9,8 @@ on:
- master
jobs:
test:
name: Testing with (Python, HA)
test_with_home_assistant:
name: Test with Home Assistant (Python, HA)
runs-on: ubuntu-latest
strategy:
max-parallel: 6
@ -66,3 +66,12 @@ jobs:
cat configuration.yaml
echo ""
hass --script check_config --config .
test_frontend_build:
name: Test frontend build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the HACS frontend
run: npm run build

View File

@ -1,6 +1,8 @@
/* eslint-disable no-console, no-undef, prefer-destructuring, prefer-destructuring, no-constant-condition, max-len */
import { HomeAssistant } from "custom-card-helpers";
import { css, CSSResultArray, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import {
css, CSSResultArray, customElement, html, LitElement, property, TemplateResult
} from "lit-element";
import { load_lovelace } from "./misc/LoadLovelace";
import { navigate } from "./misc/navigate";
import scrollToTarget from "./misc/ScrollToTarget";
@ -79,11 +81,12 @@ class HacsFrontendBase extends LitElement {
// Event subscription
this.hass.connection.sendMessagePromise(
{ type: "hacs/repository" });
{ type: "hacs/repository" }
);
this.hass.connection.subscribeEvents(
() => this.getRepositories(), "hacs/repository")
() => this.getRepositories(), "hacs/repository"
);
}
@ -130,17 +133,17 @@ class HacsFrontendBase extends LitElement {
</paper-tab>
${(this.configuration.appdaemon
? html`<paper-tab page-name="appdaemon">
? html`<paper-tab page-name="appdaemon">
${this.hass.localize(`component.hacs.common.appdaemon_apps`)}
</paper-tab>` : "")}
${(this.configuration.python_script
? html`<paper-tab page-name="python_script">
? html`<paper-tab page-name="python_script">
${this.hass.localize(`component.hacs.common.python_scripts`)}
</paper-tab>` : "")}
${(this.configuration.theme
? html`<paper-tab page-name="theme">
? html`<paper-tab page-name="theme">
${this.hass.localize(`component.hacs.common.themes`)}
</paper-tab>` : "")}

View File

@ -23,7 +23,6 @@ export class CustomRepositories extends LitElement {
public SaveSpinner?: boolean;
Delete(ev) {
console.log(ev.composedPath()[3].innerText)
if (!window.confirm(this.hass.localize("component.hacs.confirm.delete", "item", ev.composedPath()[3].innerText))) return;
this.hass.connection.sendMessagePromise({
type: "hacs/repository",