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
|
|
|
|
2021-07-07 16:33:24 +02:00
|
|
|
env:
|
2021-09-30 01:34:52 +02:00
|
|
|
NODE_OPTIONS: --max_old_space_size=6144
|
2022-11-29 19:33:43 +01:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-07-07 16:33:24 +02:00
|
|
|
|
2023-02-14 13:03:16 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-02-21 13:59:09 +01:00
|
|
|
jobs:
|
|
|
|
lint:
|
2023-02-14 13:03:16 +01:00
|
|
|
name: Lint and check format
|
2020-02-21 13:59:09 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
2023-06-12 11:46:54 +02:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-22 10:38:54 +02:00
|
|
|
- name: Setup Node
|
2023-07-10 09:51:30 +02:00
|
|
|
uses: actions/setup-node@v3.7.0
|
2020-02-21 13:59:09 +01:00
|
|
|
with:
|
2023-05-22 10:38:54 +02:00
|
|
|
node-version-file: ".nvmrc"
|
2021-07-07 16:33:24 +02:00
|
|
|
cache: yarn
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Install dependencies
|
2023-02-14 13:03:16 +01:00
|
|
|
run: yarn install --immutable
|
|
|
|
- name: Check for duplicate dependencies
|
|
|
|
run: yarn dedupe --check
|
2020-06-22 19:24:01 +02:00
|
|
|
- name: Build resources
|
2022-01-07 07:32:10 +01:00
|
|
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Run eslint
|
2023-02-14 13:03:16 +01:00
|
|
|
run: yarn run lint:eslint --quiet
|
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:
|
2023-02-14 13:03:16 +01:00
|
|
|
name: Run tests
|
2020-02-21 13:59:09 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
2023-06-12 11:46:54 +02:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-22 10:38:54 +02:00
|
|
|
- name: Setup Node
|
2023-07-10 09:51:30 +02:00
|
|
|
uses: actions/setup-node@v3.7.0
|
2020-02-21 13:59:09 +01:00
|
|
|
with:
|
2023-05-22 10:38:54 +02:00
|
|
|
node-version-file: ".nvmrc"
|
2021-07-07 16:33:24 +02:00
|
|
|
cache: yarn
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Install dependencies
|
2023-02-14 13:03:16 +01:00
|
|
|
run: yarn install --immutable
|
2021-10-01 16:58:02 +02:00
|
|
|
- name: Build resources
|
|
|
|
run: ./node_modules/.bin/gulp build-translations build-locale-data
|
2021-09-30 01:34:52 +02:00
|
|
|
- name: Run Tests
|
|
|
|
run: yarn run test
|
2020-02-21 13:59:09 +01:00
|
|
|
build:
|
2023-02-14 13:03:16 +01:00
|
|
|
name: Build frontend
|
2020-02-21 13:59:09 +01:00
|
|
|
needs: [lint, test]
|
2023-02-14 13:03:16 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-02-21 13:59:09 +01:00
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
2023-06-12 11:46:54 +02:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-22 10:38:54 +02:00
|
|
|
- name: Setup Node
|
2023-07-10 09:51:30 +02:00
|
|
|
uses: actions/setup-node@v3.7.0
|
2020-02-21 13:59:09 +01:00
|
|
|
with:
|
2023-05-22 10:38:54 +02:00
|
|
|
node-version-file: ".nvmrc"
|
2021-07-07 16:33:24 +02:00
|
|
|
cache: yarn
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Install dependencies
|
2023-02-14 13:03:16 +01:00
|
|
|
run: yarn install --immutable
|
2020-02-21 13:59:09 +01:00
|
|
|
- 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:
|
2023-02-14 13:03:16 +01:00
|
|
|
name: Build supervisor
|
2020-02-21 13:59:09 +01:00
|
|
|
needs: [lint, test]
|
2023-02-14 13:03:16 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-02-21 13:59:09 +01:00
|
|
|
steps:
|
|
|
|
- name: Check out files from GitHub
|
2023-06-12 11:46:54 +02:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-22 10:38:54 +02:00
|
|
|
- name: Setup Node
|
2023-07-10 09:51:30 +02:00
|
|
|
uses: actions/setup-node@v3.7.0
|
2020-02-21 13:59:09 +01:00
|
|
|
with:
|
2023-05-22 10:38:54 +02:00
|
|
|
node-version-file: ".nvmrc"
|
2021-07-07 16:33:24 +02:00
|
|
|
cache: yarn
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Install dependencies
|
2023-02-14 13:03:16 +01:00
|
|
|
run: yarn install --immutable
|
2020-02-21 13:59:09 +01:00
|
|
|
- name: Build Application
|
|
|
|
run: ./node_modules/.bin/gulp build-hassio
|
|
|
|
env:
|
2020-05-07 12:39:18 +02:00
|
|
|
IS_TEST: "true"
|