diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b94857f..562aa41 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,9 +28,26 @@ jobs: - name: Run native unit tests run: pio test -e native + webui: + name: Web UI tests + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "22" + + # The protocol 2 client (data-src/js) against the recorded fixtures. + - name: Run web UI tests + run: node --test "test/js/*.test.js" + build: # Don't build or publish firmware that fails its tests. - needs: test + needs: [test, webui] permissions: write-all name: ${{ matrix.name }} runs-on: ubuntu-latest diff --git a/AGENTS.md b/AGENTS.md index c4089ab..55a0dbf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,7 @@ - Fix any test or type errors until the whole suite is green. - Add or update tests for the code you change, even if nobody asked. - to test run `pio test -e native` +- the web UI's protocol 2 client (`data-src/js/`): `node --test "test/js/*.test.js"`. The minify step joins those files into `index.js`, so each one ends with a `module.exports` footer for Node and adds nothing global but its classes. ## Building - Firmware builds need pioarduino's Core (`pip install pioarduino`, or the pioarduino IDE extension). Stock PlatformIO Core refuses the pinned platform, see [ADR 0003](docs/adr/0003-pioarduino-idf55.md). diff --git a/data-src/index.html b/data-src/index.html index d52572d..4772b99 100644 --- a/data-src/index.html +++ b/data-src/index.html @@ -8,9 +8,7 @@ - - - + @@ -181,10 +179,6 @@ -