feat(server): let agents name a session when their first publish crea… #22
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22, 24] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run format:check | |
| - run: npm run lint | |
| - run: npm run typecheck | |
| - run: npm test | |
| e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium webkit | |
| - run: npm run test:e2e | |
| pack-smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm pack | |
| - run: npm install -g ./sideshow-*.tgz | |
| - run: sideshow help | |
| - name: Smoke-test server and publish round trip | |
| run: | | |
| SIDESHOW_DATA=/tmp/sideshow.json PORT=4242 sideshow serve & | |
| for i in $(seq 1 20); do curl -sf localhost:4242/api/sessions > /dev/null && break; sleep 0.5; done | |
| echo '<p>ci smoke</p>' | sideshow publish - --title "CI smoke" --agent ci | tee /tmp/out.json | |
| grep -q '"sessionId"' /tmp/out.json | |
| sideshow demo | grep -q "Seeded 2 demo sessions" | |
| curl -sf localhost:4242/guide > /dev/null |