2020-02-21 13:59:09 +01:00
|
|
|
name: CI
|
|
|
|
|
2020-02-25 19:06:14 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- master
|
2020-02-21 13:59:09 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setting up Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Get yarn cache path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- name: Fetching Yarn cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
|
|
|
env:
|
|
|
|
CI: true
|
2020-06-22 19:24:01 +02:00
|
|
|
- name: Build resources
|
|
|
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations gather-gallery-demos
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Run eslint
|
2021-04-30 21:15:31 +02:00
|
|
|
run: yarn run lint:eslint
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Run tsc
|
2021-04-30 21:15:31 +02:00
|
|
|
run: yarn run lint:types
|
|
|
|
- name: Run prettier
|
|
|
|
run: yarn run lint:prettier
|
2020-02-21 13:59:09 +01:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setting up Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Get yarn cache path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- name: Fetching Yarn cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
- name: Run Mocha
|
|
|
|
run: npm run mocha
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [lint, test]
|
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setting up Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Get yarn cache path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- name: Fetching Yarn cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
- name: Build Application
|
|
|
|
run: ./node_modules/.bin/gulp build-app
|
|
|
|
env:
|
2020-05-07 12:39:18 +02:00
|
|
|
IS_TEST: "true"
|
2020-02-21 13:59:09 +01:00
|
|
|
supervisor:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [lint, test]
|
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setting up Node.js
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
- name: Get yarn cache path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- name: Fetching Yarn cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
- name: Build Application
|
|
|
|
run: ./node_modules/.bin/gulp build-hassio
|
|
|
|
env:
|
2020-05-07 12:39:18 +02:00
|
|
|
IS_TEST: "true"
|