Skip to content

ci(deploy): set GITHUB_TOKEN on the Convex deployment during frontend… #301

ci(deploy): set GITHUB_TOKEN on the Convex deployment during frontend…

ci(deploy): set GITHUB_TOKEN on the Convex deployment during frontend… #301

Workflow file for this run

name: Tests
on:
push:
branches: [main, staging]
pull_request:
branches: [main, staging]
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: Frontend (vitest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Cache Bun install
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run tests with coverage
working-directory: apps/web
run: bun run test:coverage
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: frontend-coverage
path: apps/web/coverage
retention-days: 14
convex:
name: Convex (vitest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Cache Bun install
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run tests with coverage
working-directory: packages/convex-backend
run: bun run test:coverage
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: convex-coverage
path: packages/convex-backend/coverage
retention-days: 14
fastapi:
name: FastAPI (pytest)
runs-on: ubuntu-latest
# Redis service for the live-stream fan-out integration tests
# (test_stream_bus_integration). They skip when REDIS_URL_TEST is
# unreachable, so locals without Redis aren't blocked — CI always has it.
services:
redis:
# Match the prod box's redis6.2 (op set is stable, but test what we ship).
image: redis:6.2-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
cache-dependency-path: packages/fastapi/requirements-dev.txt
- name: Install dependencies
working-directory: packages/fastapi
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run tests with coverage
working-directory: packages/fastapi
env:
REDIS_URL_TEST: redis://localhost:6379/15
run: pytest --cov --cov-report=term --cov-report=xml --cov-report=html
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: fastapi-coverage
path: |
packages/fastapi/htmlcov
packages/fastapi/coverage.xml
retention-days: 14