fix: demo conversations now show without API connection #148
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master, 'dev/*' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- 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 | |
- name: Start gptme-server in background | |
env: | |
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
run: | | |
# pipx install gptme[server] | |
pipx install "gptme[server] @ git+https://github.com/gptme/gptme.git" | |
gptme-server --cors-origin="http://localhost:5701" & # run in background | |
sleep 3 # sleep so we get initial logs | |
- 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@v4 | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |