94 lines
2.1 KiB
YAML
94 lines
2.1 KiB
YAML
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"
|
|
- name: Lint OpenAPI
|
|
run: npx --yes @redocly/cli@1.34.6 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
|