mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-04 01:10:33 -06:00
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](8b402f58fb...cdf6c1fa76)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 5.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
104 lines
3.2 KiB
YAML
104 lines
3.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
- master
|
|
|
|
env:
|
|
NODE_OPTIONS: --max_old_space_size=6144
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint and check format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out files from GitHub
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Setup Node
|
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: yarn
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Check for duplicate dependencies
|
|
run: yarn dedupe --check
|
|
- name: Build resources
|
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
|
- name: Setup lint cache
|
|
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
|
with:
|
|
path: |
|
|
node_modules/.cache/prettier
|
|
node_modules/.cache/eslint
|
|
node_modules/.cache/typescript
|
|
key: lint-${{ github.sha }}
|
|
restore-keys: lint-
|
|
- name: Run eslint
|
|
run: yarn run lint:eslint --quiet
|
|
- name: Run tsc
|
|
run: yarn run lint:types
|
|
- name: Run lit-analyzer
|
|
run: yarn run lint:lit --quiet
|
|
- name: Run prettier
|
|
run: yarn run lint:prettier
|
|
test:
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out files from GitHub
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Setup Node
|
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: yarn
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Build resources
|
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
|
|
- name: Run Tests
|
|
run: yarn run test
|
|
build:
|
|
name: Build frontend
|
|
needs: [lint, test]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out files from GitHub
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Setup Node
|
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: yarn
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Build Application
|
|
run: ./node_modules/.bin/gulp build-app
|
|
env:
|
|
IS_TEST: "true"
|
|
- name: Upload bundle stats
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: frontend-bundle-stats
|
|
path: build/stats/*.json
|
|
if-no-files-found: error
|
|
- name: Upload frontend build
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: frontend-build
|
|
path: hass_frontend/
|
|
if-no-files-found: error
|
|
retention-days: 7
|