test(auth): pin the over-age token asymmetry the interceptor reacts t… #1180
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate Package | |
| on: | |
| push: | |
| branches: [latest, beta-*.*.*, beta, alpha-*.*.*, alpha] | |
| pull_request: | |
| branches: [latest, beta-*.*.*, beta] | |
| types: [review_requested, ready_for_review] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_and_test: | |
| name: Build and run npm test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # windows-11-arm is not working (yet), see: | |
| # https://github.com/homebridge/homebridge-config-ui-x/actions/runs/16482469131/job/46600012357 | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-24.04 | |
| - ubuntu-22.04 | |
| - ubuntu-24.04-arm | |
| - ubuntu-22.04-arm | |
| - macos-latest | |
| - macos-26 | |
| - macos-15 | |
| - macos-26-intel | |
| - macos-15-intel | |
| - windows-latest | |
| - windows-2025 | |
| - windows-2022 | |
| - windows-11-arm | |
| uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest | |
| with: | |
| enable_coverage: false | |
| # # Code Coverage can only be used in a single run, not in a parallel run - Error: Bad response: 422 {"message":"Can't add a job to a build that is already closed. Build 6224987022 is closed. See docs.coveralls.io/parallel-builds","error":true} | |
| # # Coveralls only expects to create a report once per build | |
| runs_on: ${{ matrix.os }} | |
| install_cmd: npm i && cd ui && npm i | |
| secrets: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # Validate that the UI can be installed and ran across all platforms | |
| validate_service_starts: | |
| needs: build_and_test | |
| name: Validate | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # windows-11-arm is not working (yet), see: | |
| # As https://github.com/homebridge/nssm is not available for arm64, we cannot run hb-service on Windows 11 ARM | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-24.04 | |
| - ubuntu-22.04 | |
| - ubuntu-24.04-arm | |
| - ubuntu-22.04-arm | |
| - macos-latest | |
| - macos-26 | |
| - macos-15 | |
| - macos-26-intel | |
| - macos-15-intel | |
| - windows-latest | |
| - windows-2025 | |
| - windows-2022 | |
| - windows-11-arm | |
| node-version: [20.x, 22.x, 24.x, 26.x] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm i | |
| - run: npm run build:server | |
| - run: npm run test | |
| # remove dev deps | |
| - run: npm clean-install --omit=dev | |
| # test hb-service | |
| - run: node dist/bin/hb-service.js -v | |
| - if: runner.os == 'Linux' | |
| name: Run hb-service install (Linux) | |
| run: | | |
| sudo npm link | |
| sudo npm install -g --omit=dev homebridge | |
| sudo hb-service install --user homebridge --group `id -gn` | |
| sleep 30 | |
| - if: runner.os == 'macOS' | |
| name: Run hb-service install (macOS) | |
| run: | | |
| sudo npm link | |
| sudo npm install -g --omit=dev homebridge | |
| sudo hb-service install | |
| sleep 30 | |
| - if: runner.os == 'Windows' | |
| name: Run hb-service install (Windows) | |
| run: | | |
| npm link | |
| npm install -g --omit=dev homebridge | |
| hb-service install | |
| Start-Sleep -s 30 | |
| - name: Test hb-service install | |
| run: node dist/bin/hb-service.js status --port 8581 | |
| - name: View Errors | |
| if: ${{ failure() }} | |
| run: | | |
| node dist/bin/hb-service.js view | |
| exit 1 | |
| # The UI unit tests run in jsdom, so a single platform is enough | |
| ui_test: | |
| name: Test UI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: ui/package-lock.json | |
| - name: Install UI dependencies | |
| run: npm ci | |
| working-directory: ui | |
| - name: Run UI tests | |
| run: npm run test | |
| working-directory: ui | |
| lint: | |
| needs: build_and_test | |
| uses: homebridge/.github/.github/workflows/eslint.yml@latest | |
| with: | |
| install_cmd: npm i && cd ui && npm i |