Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .browserslistrc

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

# Nothing used to build or lint this repository on a pull request - only CodeQL
# ran - so a change that broke the build was first discovered by the deploy,
# after it had already been merged.
#
# Pushes to `source` are not built here: `pages.yml` already builds them, as
# part of deploying.

on:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v6
with:
# Deliberately the single version `pages.yml` deploys with, so that a
# green check here means the deploy will build too. The site is static
# output with no consumers, so a version matrix would only add ways to
# fail that production never sees.
node-version: 24
cache: npm

- name: Install
run: npm ci

# `npm run gen` regenerates the HAP and Matter reference from the
# `hap-nodejs` and `homebridge` dependencies, so this also catches a
# generator broken by a bump to either.
- name: Generate
run: npm run gen

- name: Build
run: npm run build

# Last, so that a genuine build failure is reported before this one.
#
# The deploy runs `gen` before it builds, so the live site always reflects
# the current dependencies - which means stale generated files committed
# here are invisible until someone reads the repository and believes them.
# A `homebridge` bump that added Matter device types went unnoticed this
# way. Every generator writes under `src/`, so diffing the whole tree needs
# no list of paths to fall out of date.
- name: Check the generated files are committed
run: |
if ! git diff --quiet; then
echo "::error::'npm run gen' changed files that are committed to the repository. Run 'npm run gen' locally and commit the result."
git diff --stat
git diff
exit 1
fi

lint:
uses: homebridge/.github/.github/workflows/eslint.yml@latest
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export default antfu(
'angular/prefer-inject': 'error',
'angular/prefer-on-push-component-change-detection': 'error',
'angular/prefer-output-emitter-ref': 'error',
'angular/prefer-output-readonly': 'error',
'angular/prefer-signal-model': 'error',
'angular/prefer-signals': 'error',
'angular/prefer-standalone': 'error',
Expand Down
Loading