Draft a guide for AI agents to follow #911
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: Test browsers | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| ci: | |
| name: Test browsers | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Install Chrome | |
| uses: browser-actions/setup-chrome@v2.1.1 | |
| with: | |
| chrome-version: "latest" | |
| - name: Install Firefox | |
| uses: browser-actions/setup-firefox@v1.7.1 | |
| with: | |
| firefox-version: "latest" | |
| - name: Install Xvfb | |
| run: sudo apt-get install -y xvfb | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Run Node unit tests with coverage | |
| run: npm run test:node:coverage | |
| - name: Run browser tests with coverage | |
| run: | | |
| export DISPLAY=':99.0' | |
| Xvfb $DISPLAY -screen 0 1920x1080x24 & | |
| sleep 3 | |
| export XDG_RUNTIME_DIR="/run/user/$(id -u)" | |
| export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus" | |
| dbus-run-session npm run test:browser:coverage | |
| - name: Upload Node coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage/node/lcov.info | |
| flags: node | |
| name: node | |
| fail_ci_if_error: false | |
| - name: Upload browser coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage/browser/lcov.info | |
| flags: browser | |
| name: browser | |
| fail_ci_if_error: false |