Compare commits

...

3 Commits

Author SHA1 Message Date
Aidan Timson 66c105e29c Benchmark compact workflow image 2026-07-13 11:38:46 +01:00
Aidan Timson 0b591f60ee Align benchmark lint cache keys 2026-07-13 11:09:54 +01:00
Aidan Timson 3b9db7c0a6 Add CI accelerator benchmark 2026-07-13 10:55:23 +01:00
@@ -0,0 +1,126 @@
name: CI accelerator benchmark
on:
workflow_dispatch:
push:
branches:
- workflows-global-build-image
env:
NODE_OPTIONS: --max_old_space_size=6144
permissions:
contents: read
jobs:
baseline:
name: Baseline / ${{ matrix.workload }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
workload:
- lint
- test
steps:
- name: Check out files from GitHub
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Node and install
uses: ./.github/actions/setup
- name: Check for duplicate dependencies
if: matrix.workload == 'lint'
run: yarn dedupe --check
- name: Build resources
id: build_resources
run: >-
./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
${{ matrix.workload == 'lint' && 'gather-gallery-pages' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup lint cache
if: matrix.workload == 'lint'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
node_modules/.cache/prettier
node_modules/.cache/eslint
node_modules/.cache/typescript
key: lint-${{ github.sha }}
restore-keys: lint-
- name: Run eslint
if: matrix.workload == 'lint'
run: yarn run lint:eslint --quiet
- name: Run tsc
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:types
- name: Run lit-analyzer
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:lit --quiet
- name: Run prettier
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:prettier
- name: Check dependency licenses
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:licenses
- name: Run tests
if: matrix.workload == 'test'
run: yarn run test
image:
name: Image / ${{ matrix.workload }}
runs-on: ubuntu-latest
container:
image: ghcr.io/timmo001/home-assistant-frontend-ci-images/frontend-workflow@sha256:ffa4d621b4495bf456b7ab3c632f550e329fe78c2d571167aa0899a52c4932c3
strategy:
fail-fast: false
matrix:
workload:
- lint
- test
steps:
- name: Check out files from GitHub
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install dependencies
run: frontend-install
- name: Check for duplicate dependencies
if: matrix.workload == 'lint'
run: yarn dedupe --check
- name: Build resources
id: build_resources
run: >-
./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
${{ matrix.workload == 'lint' && 'gather-gallery-pages' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup lint cache
if: matrix.workload == 'lint'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
node_modules/.cache/prettier
node_modules/.cache/eslint
node_modules/.cache/typescript
key: lint-${{ github.sha }}
restore-keys: lint-
- name: Run eslint
if: matrix.workload == 'lint'
run: yarn run lint:eslint --quiet
- name: Run tsc
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:types
- name: Run lit-analyzer
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:lit --quiet
- name: Run prettier
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:prettier
- name: Check dependency licenses
if: matrix.workload == 'lint' && !cancelled() && steps.build_resources.outcome == 'success'
run: yarn run lint:licenses
- name: Run tests
if: matrix.workload == 'test'
run: yarn run test