Skip to content

Commit 35d89d6

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/frontend/eslint-10.1.0
2 parents b1c5b13 + 458ee34 commit 35d89d6

26 files changed

Lines changed: 1996 additions & 0 deletions
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Keep the initial policy focused on risky dependency changes first.
2+
# This allowlist is intentionally based on the licenses already present in the
3+
# current dependency tree so normal updates do not become noisy immediately.
4+
fail-on-severity: high
5+
fail-on-scopes:
6+
- runtime
7+
- unknown
8+
license-check: true
9+
allow-licenses:
10+
- Apache-2.0
11+
- Apache-2.0 AND LGPL-3.0-or-later
12+
- Apache-2.0 OR BSD-2-Clause
13+
- BSD-2-Clause
14+
- BSD-3-Clause
15+
- BlueOak-1.0.0
16+
- CC-BY-4.0
17+
- CC0-1.0
18+
- ISC
19+
- MIT
20+
- MPL-2.0
21+
- PSF-2.0
22+
- Python-2.0
23+
- 0BSD

.github/labels.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[
2+
{
3+
"name": "frontend",
4+
"color": "0e7490",
5+
"description": "Changes focused on the Next.js app or UI flows."
6+
},
7+
{
8+
"name": "ui",
9+
"color": "0891b2",
10+
"description": "Visual presentation, overlays, or interaction changes."
11+
},
12+
{
13+
"name": "backend",
14+
"color": "166534",
15+
"description": "Changes focused on the FastAPI service or vision logic."
16+
},
17+
{
18+
"name": "api",
19+
"color": "15803d",
20+
"description": "OpenAPI contract, schemas, or request-response behavior."
21+
},
22+
{
23+
"name": "ci",
24+
"color": "4f46e5",
25+
"description": "Continuous integration or workflow changes."
26+
},
27+
{
28+
"name": "release",
29+
"color": "7c3aed",
30+
"description": "Release automation, packaging, or publish flow changes."
31+
},
32+
{
33+
"name": "infra",
34+
"color": "4338ca",
35+
"description": "Developer tooling, scripts, or environment setup changes."
36+
},
37+
{
38+
"name": "docs",
39+
"color": "ca8a04",
40+
"description": "Documentation-only changes."
41+
},
42+
{
43+
"name": "chore",
44+
"color": "6b7280",
45+
"description": "Maintenance work with little or no product impact."
46+
},
47+
{
48+
"name": "patch",
49+
"color": "1d4ed8",
50+
"description": "Patch-level release bump."
51+
},
52+
{
53+
"name": "minor",
54+
"color": "2563eb",
55+
"description": "Minor release bump."
56+
},
57+
{
58+
"name": "major",
59+
"color": "b91c1c",
60+
"description": "Major release bump."
61+
}
62+
]

.github/release-drafter.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name-template: "v$NEXT_PATCH_VERSION"
2+
tag-template: "v$NEXT_PATCH_VERSION"
3+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
4+
template: |
5+
## Changes
6+
7+
$CHANGES
8+
9+
## Docker Images
10+
11+
Replace `<repo-owner>` with the GitHub user or org that owns the repository.
12+
13+
- `ghcr.io/<repo-owner>/nextjs-python-computer-vision-kit-backend:$RESOLVED_VERSION`
14+
- `ghcr.io/<repo-owner>/nextjs-python-computer-vision-kit-frontend:$RESOLVED_VERSION`
15+
16+
categories:
17+
- title: "Frontend"
18+
labels:
19+
- frontend
20+
- ui
21+
- title: "Backend"
22+
labels:
23+
- backend
24+
- api
25+
- title: "CI/CD"
26+
labels:
27+
- ci
28+
- release
29+
- infra
30+
- title: "Docs"
31+
labels:
32+
- docs
33+
- title: "Maintenance"
34+
labels:
35+
- chore
36+
37+
change-title-escapes: '\<*_&'
38+
39+
version-resolver:
40+
major:
41+
labels:
42+
- major
43+
minor:
44+
labels:
45+
- minor
46+
patch:
47+
labels:
48+
- patch
49+
default: patch
50+
51+
autolabeler:
52+
- label: frontend
53+
files:
54+
- "frontend/**"
55+
- label: ui
56+
files:
57+
- "frontend/src/**"
58+
- "docs/assets/**"
59+
- label: backend
60+
files:
61+
- "backend/**"
62+
- label: api
63+
files:
64+
- "docs/openapi.yaml"
65+
- "backend/app/**"
66+
- "backend/tests/test_inference_route.py"
67+
- "frontend/src/generated/openapi.ts"
68+
- "frontend/src/lib/api.ts"
69+
- label: ci
70+
files:
71+
- ".github/workflows/**"
72+
- label: release
73+
files:
74+
- ".github/release-drafter.yml"
75+
- ".github/workflows/release-drafter.yml"
76+
- ".github/workflows/release.yml"
77+
- ".github/workflows/release-smoke.yml"
78+
- ".github/workflows/sync-labels.yml"
79+
- ".github/labels.json"
80+
- "scripts/check-release-smoke.mjs"
81+
- label: infra
82+
files:
83+
- "scripts/**"
84+
- "backend/Dockerfile"
85+
- "backend/.dockerignore"
86+
- "frontend/Dockerfile"
87+
- "frontend/.dockerignore"
88+
- "docker-compose.yml"
89+
- label: docs
90+
files:
91+
- "README.md"
92+
- "CONTRIBUTING.md"
93+
- "AGENTS.md"
94+
- "SECURITY.md"
95+
- "soon.md"
96+
- "docs/**"

.github/workflows/codeql.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
schedule:
9+
- cron: "18 3 * * 1"
10+
workflow_dispatch:
11+
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
17+
jobs:
18+
analyze:
19+
name: Analyze (${{ matrix.language }})
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 45
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: javascript-typescript
27+
build-mode: none
28+
- language: python
29+
build-mode: none
30+
- language: actions
31+
build-mode: none
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v4
41+
with:
42+
languages: ${{ matrix.language }}
43+
build-mode: ${{ matrix.build-mode }}
44+
45+
- name: Perform CodeQL analysis
46+
uses: github/codeql-action/analyze@v4
47+
with:
48+
category: "/language:${{ matrix.language }}"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
10+
jobs:
11+
dependency-review:
12+
name: Dependency Review
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Review dependency changes
19+
uses: actions/dependency-review-action@v4
20+
with:
21+
config-file: ./.github/dependency-review-config.yml
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: License Report
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: "36 3 * * 2"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
license-report:
16+
name: License Report
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version-file: .nvmrc
26+
cache: npm
27+
cache-dependency-path: |
28+
package-lock.json
29+
frontend/package-lock.json
30+
31+
- name: Setup Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.12"
35+
cache: pip
36+
cache-dependency-path: backend/pyproject.toml
37+
38+
- name: Install root tooling
39+
run: npm ci
40+
41+
- name: Install frontend dependencies
42+
run: npm ci
43+
working-directory: frontend
44+
45+
- name: Install backend dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
python -m pip install -e ./backend[dev]
49+
50+
- name: Generate license reports
51+
run: npm run report:licenses
52+
53+
- name: Upload license reports
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: license-reports
57+
path: reports/licenses/
58+
if-no-files-found: error
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request_target:
8+
types:
9+
- opened
10+
- reopened
11+
- synchronize
12+
- ready_for_review
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
19+
jobs:
20+
update-release-draft:
21+
name: Update Release Draft
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Update draft release notes
25+
uses: release-drafter/release-drafter@v6
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release Smoke
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: "Release tag to smoke test, for example v0.1.0"
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: read
16+
packages: read
17+
18+
jobs:
19+
smoke:
20+
name: Smoke Test Published Images
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 20
23+
steps:
24+
- name: Resolve release tag and owner
25+
id: vars
26+
shell: bash
27+
run: |
28+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
29+
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
30+
else
31+
echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
32+
fi
33+
echo "owner=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_OUTPUT"
34+
35+
- name: Checkout repository at release tag
36+
uses: actions/checkout@v4
37+
with:
38+
ref: ${{ steps.vars.outputs.tag }}
39+
40+
- name: Setup Node
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version-file: .nvmrc
44+
45+
- name: Log in to GHCR
46+
uses: docker/login-action@v3
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.actor }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Smoke test published backend and frontend images
53+
run: npm run check:release-smoke
54+
env:
55+
BACKEND_IMAGE: ghcr.io/${{ steps.vars.outputs.owner }}/nextjs-python-computer-vision-kit-backend:${{ steps.vars.outputs.tag }}
56+
FRONTEND_IMAGE: ghcr.io/${{ steps.vars.outputs.owner }}/nextjs-python-computer-vision-kit-frontend:${{ steps.vars.outputs.tag }}

0 commit comments

Comments
 (0)