name: CI on: push: branches: [main] pull_request: branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: lint-typecheck: name: Lint & TypeCheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 9 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - name: Web lint run: pnpm --filter web lint - name: Extension lint run: pnpm --filter browser-ext lint test: name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 9 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - name: Web tests run: pnpm --filter web test - name: Extension tests run: pnpm --filter browser-ext test build: name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 9 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - name: Build web run: pnpm --filter web build - name: Build extension run: pnpm --filter browser-ext build - name: Upload web artifact uses: actions/upload-artifact@v4 with: name: web-build path: web/.output retention-days: 7 security: name: Security Audit runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 9 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - name: Audit dependencies run: pnpm audit --audit-level=high || true - name: Check for secrets run: | if grep -r "sk_live_" web/.env* 2>/dev/null | grep -v "^\s*#" | grep -v '""'; then echo "::error::Potential secret found in env files" exit 1 fi docker: name: Docker Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build web image uses: docker/build-push-action@v5 with: context: . file: web/Dockerfile push: false tags: kordant-web:test cache-from: type=gha cache-to: type=gha,mode=max