-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.45 KB
/
agent-gateway-ci.yml
File metadata and controls
60 lines (50 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Agent Gateway CI
on:
pull_request:
paths:
- "apps/agent-gateway/**"
- ".github/workflows/agent-gateway-ci.yml"
push:
branches: [main]
paths:
- "apps/agent-gateway/**"
- ".github/workflows/agent-gateway-ci.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
lint-and-test:
name: Lint and test gateway
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "apps/agent-gateway/uv.lock"
- name: Install gateway dependencies
run: uv sync --project apps/agent-gateway --extra dev
- name: Ruff
run: uv run --project apps/agent-gateway ruff check src tests scripts
working-directory: apps/agent-gateway
- name: Pytest
run: uv run --project apps/agent-gateway pytest -q tests
working-directory: apps/agent-gateway
docker-build:
name: Build gateway image
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
context: apps/agent-gateway
file: apps/agent-gateway/Dockerfile
tags: knowcode-agent-gateway:ci
push: false