Skip to content

feat(embed): add the Go router (net/http) #42

feat(embed): add the Go router (net/http)

feat(embed): add the Go router (net/http) #42

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
spec:
name: Lint /embed contract
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Spectral lint the OpenAPI contract
run: pnpm dlx @stoplight/spectral-cli@6 lint packages/embed/openapi/embed.openapi.yaml --ruleset packages/embed/openapi/.spectral.yaml
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run format:check
- run: pnpm run typecheck
- run: pnpm run test
- run: pnpm run build
conformance:
name: Conformance (${{ matrix.router }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
router: [ts, go]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
if: matrix.router == 'ts'
- uses: actions/setup-node@v4
if: matrix.router == 'ts'
with:
node-version: 22
cache: pnpm
- name: Build the TS router
if: matrix.router == 'ts'
run: |
pnpm install --frozen-lockfile
pnpm -C routers/typescript build
- name: Set up Go
if: matrix.router == 'go'
uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: astral-sh/setup-uv@v5
- name: Set up the conformance harness
working-directory: conformance
run: |
uv venv --python 3.10 .venv
uv pip install --python .venv/bin/python schemathesis pytest httpx
- name: Run conformance (${{ matrix.router }})
working-directory: conformance
env:
ROUTER: ${{ matrix.router }}
run: .venv/bin/python -m pytest -q