name: ci on: push: branches: [main] pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: openapi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "22" # PH-021: cache npm so the pinned @redocly/cli version below is fetched # once per cache hit; the version is pinned by exact tag in this file # so the same artifact is used across runs. cache: npm cache-dependency-path: web/package-lock.json - name: Lint OpenAPI # PH-021: @redocly/cli is not in package.json because it is a lint-only # tool that does not ship with the web bundle. The exact version below # is the reproducibility pin; do not float to "latest" or a range. run: npx --yes @redocly/cli@2.11.1 lint api/openapi.yaml agent: runs-on: ubuntu-latest defaults: run: working-directory: agent steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.25.7" cache: true cache-dependency-path: agent/go.sum - name: gofmt run: | out=$(gofmt -l .) if [ -n "$out" ]; then echo "$out"; exit 1; fi - name: vet run: go vet ./... - name: test run: go test ./... - name: race run: go test -race ./... server: runs-on: ubuntu-latest defaults: run: working-directory: server steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.14" - uses: astral-sh/setup-uv@v3 with: enable-cache: true - name: install run: uv sync --extra dev - name: lint run: uv run ruff check . && uv run ruff format --check . - name: test run: uv run pytest -q web: runs-on: ubuntu-latest defaults: run: working-directory: web steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "22" cache: npm cache-dependency-path: web/package-lock.json - run: npm ci --no-audit --no-fund - run: npm run gen:api - run: npm run lint - run: npm run typecheck - run: npm run build - name: install playwright browser run: npx playwright install chromium - run: npm run smoke stack-smoke: runs-on: ubuntu-latest needs: [server, agent] steps: - uses: actions/checkout@v4 - name: stack smoke run: bash deploy/smoke.sh