Skip to content

feat(admission): add opt-in shared concurrency admission leases #191

feat(admission): add opt-in shared concurrency admission leases

feat(admission): add opt-in shared concurrency admission leases #191

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
- review/**
permissions:
contents: read
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install Python dependencies
run: python -m pip install --disable-pip-version-check --require-hashes -r requirements-ci.lock
- name: Static secret scan
run: python scripts/check_static_secrets.py
- name: Ruff fatal checks
run: ruff check . --select E9,F63,F7,F82
- name: Type import checks
run: >
mypy --ignore-missing-imports --follow-imports=skip
--disable-error-code import-untyped
--disable-error-code var-annotated
--disable-error-code arg-type
--disable-error-code assignment
--disable-error-code operator
app.py routes services providers streaming
- name: Bandit security scan
run: >
bandit -q -c .bandit
-r app.py config.py error_handlers.py route_helpers.py routes services providers streaming
- name: Dependency audit
run: pip-audit -r requirements.lock
- name: Python tests
run: python -m pytest -q
node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
cache: npm
- name: Install Node dependencies
run: npm ci
- name: Node audit
run: npm audit --audit-level=high
- name: Frontend build contracts
run: node --test tests/test_frontend_build.mjs
- name: Worker tests
run: npm run test:worker
- name: D1 migration checks
run: npm run cf:migrations:check
- name: Deploy pipeline tests
run: npm run test:deploy
- name: Free pool Worker contracts
run: node --test tests/test_free_routes_worker.mjs
- name: Client header contracts
run: node --test tests/test_client_headers_worker.mjs
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install Python dependencies
run: python -m pip install --disable-pip-version-check --require-hashes -r requirements-ci.lock
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
cache: npm
- name: Install Node dependencies
run: npm ci
- name: Python accounts and routes through the Worker and a real D1
env:
PYTHON: python
run: npm run test:integration
cloudflare-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
- name: Install deployment package manager
run: npm install --global "$(node -p "require('./package.json').packageManager")"
- name: Install deployment dependencies
run: pnpm install --frozen-lockfile
- name: Build frontend assets
run: pnpm run build
- name: Check committed frontend assets
run: git diff --exit-code -- static/css/style.css
- name: Frontend build contracts
run: node --test tests/test_frontend_build.mjs
- name: Validate Knowledge Worker bundle
env:
WRANGLER_SEND_METRICS: "false"
run: pnpm exec wrangler deploy --config wrangler.knowledge.jsonc --dry-run --outdir /tmp/knowledge-worker
- name: Validate main Worker bundle
env:
WRANGLER_SEND_METRICS: "false"
run: pnpm exec wrangler deploy --dry-run --containers-rollout=none --outdir /tmp/main-worker