fix(chats): escape regex in search highlight and fix repr'd output (#… #1
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: WebUI | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'webui/**' | |
| - '.github/workflows/webui.yml' | |
| pull_request: | |
| branches: [ master, 'dev/*' ] | |
| paths: | |
| - 'webui/**' | |
| - '.github/workflows/webui.yml' | |
| defaults: | |
| run: | |
| working-directory: webui | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: webui/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Lint | |
| run: npm run lint | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js 20 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| cache-dependency-path: webui/package-lock.json | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install gptme server | |
| run: | | |
| pip install "gptme[server] @ git+https://github.com/gptme/gptme.git" | |
| - name: Start gptme-server in background | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: | | |
| gptme-server --cors-origin="http://localhost:5701" & | |
| sleep 3 | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Check that server is up | |
| run: curl --retry 2 --retry-delay 5 --retry-connrefused -sSfL http://localhost:5700/api | |
| - name: Run e2e tests | |
| run: npm run test:e2e | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: playwright-report | |
| path: webui/playwright-report/ | |
| retention-days: 30 |