Skip to content

Commit 93e3d7f

Browse files
committed
Added workflows for pre-production testing, staging deploys, production deploys, and a release request issue template; updated README deployment instructions.
1 parent 9607aa0 commit 93e3d7f

7 files changed

Lines changed: 198 additions & 33 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Release Request"
2+
description: "Request a deployment by specifying the evaluation function, changes, target commit/branch, and test confirmation."
3+
title: "Release Request"
4+
labels:
5+
- release
6+
- deployment
7+
assignees: []
8+
body:
9+
- type: textarea
10+
id: description_of_changes
11+
attributes:
12+
label: Description of changes
13+
description: "Summarize what is changing and why. Include links to PRs, issues, or changelogs."
14+
placeholder: |
15+
- What changed:
16+
- Why:
17+
- Related PRs/Issues: #123, #456
18+
render: markdown
19+
validations:
20+
required: true
21+
22+
- type: input
23+
id: branch_to_deploy
24+
attributes:
25+
label: Branch to deploy
26+
description: |
27+
Specify Branch name to deploy.
28+
placeholder: "e.g., release/2025-09-29"
29+
validations:
30+
required: true
31+
32+
- type: dropdown
33+
id: version-bump
34+
attributes:
35+
label: "🚀 What kind of update is this?"
36+
description: "Tell us how significant this change is. This helps us set the correct new version number."
37+
options:
38+
- "Patch: A small fix for a bug. It won't break anything for existing users. (e.g., 1.2.3 ➔ 1.2.4)"
39+
- "Minor: Adds a new feature, but doesn't change how existing ones work. A safe update. (e.g., 1.2.3 ➔ 1.3.0)"
40+
- "Major: A big change that alters existing features. Users may need to update their work to adapt. (e.g., 1.2.3 ➔ 2.0.0)"
41+
default: 0
42+
validations:
43+
required: true
44+
45+
- type: markdown
46+
attributes:
47+
value: |
48+
---
49+
### ⚡ Click the Link Below to Run the Workflow
50+
51+
Clicking the link will take you to the Actions page. You will need to click the **"Run workflow"** button there to start the process.
52+
53+
## [➡️ Go to Workflow Run Page](../actions/workflows/production-deploy.yml)

.github/workflows/build.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,10 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
test:
12-
name: Test
13-
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/lean_test.yml@main
14-
with:
15-
lint-module: "Evaluation"
16-
permissions:
17-
contents: read
18-
id-token: write
19-
packages: write
20-
2111
build:
2212
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/build.yml@main
23-
needs: [test]
2413
with:
25-
build-args: |
26-
LEAN_VERSION=${{ needs.test.outputs.lean-version }}
14+
build-target: final
2715
permissions:
2816
contents: read
2917
id-token: write

.github/workflows/deploy.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,17 @@ on:
44
push:
55
branches:
66
- main
7+
- master
78
workflow_dispatch:
89

910
jobs:
10-
test:
11-
name: Test
12-
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/lean_test.yml@main
13-
with:
14-
lint-module: "Evaluation"
15-
permissions:
16-
contents: read
17-
id-token: write
18-
packages: write
19-
2011
deploy:
2112
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main
22-
needs: [test]
2313
with:
24-
template-repository-name: "lambda-feedback/evaluation-function-boilerplate-lean"
25-
build-args: |
26-
LEAN_VERSION=${{ needs.test.outputs.lean-version }}
27-
permissions:
28-
contents: read
29-
id-token: write
30-
packages: write
14+
template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-wolfram'
15+
build-platforms: 'gcp'
3116
secrets:
3217
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
33-
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET }}
34-
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY }}
18+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
19+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
20+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Run Pre-Production Validation Tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
eval_function:
7+
type: string
8+
description: "The name of the evaluation function to test"
9+
required: true
10+
sql_limit:
11+
type: number
12+
description: "The maximum number of SQL test cases to run"
13+
required: false
14+
default: 500
15+
seed:
16+
type: string
17+
description: "Random seed for reproducible sampling (float in [-1.0, 1.0]). Leave blank to auto-generate."
18+
required: false
19+
default: ''
20+
request_delay:
21+
type: string
22+
description: "Delay (seconds) between dispatching requests"
23+
required: false
24+
default: '0'
25+
max_concurrency:
26+
type: string
27+
description: "Max concurrent requests (lower for GPT-backed functions)"
28+
required: false
29+
default: '5'
30+
31+
jobs:
32+
run-pre-production-tests:
33+
name: 🧪 Run Staging Validation Tests
34+
uses: lambda-feedback/Database-Testing/.github/workflows/test_evaluation_function.yml@main
35+
with:
36+
eval_function: ${{ inputs.eval_function }}
37+
sql_limit: ${{ inputs.sql_limit }}
38+
seed: ${{ inputs.seed }}
39+
request_delay: ${{ inputs.request_delay }}
40+
max_concurrency: ${{ inputs.max_concurrency }}
41+
secrets:
42+
TEST_API_ENDPOINT: ${{ secrets.TEST_API_ENDPOINT }}
43+
DB_USER: ${{ secrets.DB_USER }}
44+
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
45+
DB_HOST: ${{ secrets.DB_HOST }}
46+
DB_PORT: ${{ secrets.DB_PORT }}
47+
DB_NAME: ${{ secrets.DB_NAME }}
48+
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_DB_CREDS }}
49+
GCP_PROJECT_ID: ${{ secrets.GCP_DB_PROJECT_ID }}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy to Production
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version-bump:
7+
description: 'Version bump type'
8+
required: true
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
default: patch
15+
branch:
16+
description: 'Branch to release from'
17+
required: true
18+
type: string
19+
default: 'main'
20+
seed:
21+
description: 'Random seed for reproducible sampling (float in [-1.0, 1.0]). Leave blank to auto-generate.'
22+
required: false
23+
type: string
24+
default: ''
25+
request_delay:
26+
description: 'Delay (seconds) between dispatching requests'
27+
required: false
28+
type: string
29+
default: '0'
30+
max_concurrency:
31+
description: 'Max concurrent requests (lower for GPT-backed functions)'
32+
required: false
33+
type: string
34+
default: '5'
35+
jobs:
36+
deploy:
37+
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request
38+
with:
39+
template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-python'
40+
build-file: "app/Dockerfile"
41+
build-context: "./app"
42+
environment: "production"
43+
version-bump: ${{ inputs.version-bump }}
44+
branch: ${{ inputs.branch }}
45+
run-database-tests: false
46+
seed: ${{ inputs.seed }}
47+
request_delay: ${{ inputs.request_delay }}
48+
max_concurrency: ${{ inputs.max_concurrency }}
49+
50+
secrets:
51+
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
52+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
53+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
54+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}
55+
TEST_API_ENDPOINT: ${{ secrets.TEST_API_ENDPOINT }}
56+
DB_USER: ${{ secrets.DB_USER }}
57+
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
58+
DB_HOST: ${{ secrets.DB_HOST }}
59+
DB_PORT: ${{ secrets.DB_PORT }}
60+
DB_NAME: ${{ secrets.DB_NAME }}
61+
GCP_DB_CREDS: ${{ secrets.GCP_DB_CREDS }}
62+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Deploy to Staging
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request
12+
with:
13+
template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python"
14+
build-file: "app/Dockerfile"
15+
build-context: "./app"
16+
build-platforms: "aws"
17+
environment: "staging"
18+
lfs: false
19+
secrets:
20+
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
21+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
22+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
23+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This repository contains the boilerplate code needed to create a containerized evaluation function written in Lean 4 Language.
44

5+
## Deployment
6+
[![Create Release Request](https://img.shields.io/badge/Create%20Release%20Request-blue?style=for-the-badge)](https://github.com/lambda-feedback/{REPO_NAME_HERE}/issues/new?template=release-request.yml)
7+
To deploy to production, update the README button above to point to the correct repository.
8+
59
## Quickstart
610

711
This chapter helps you to quickly creating a new Lean 4 evaluation function using this template repository.

0 commit comments

Comments
 (0)