Skip to content

Commit 3fe0d90

Browse files
authored
Implemented new workflows (#1)
* Added workflows for pre-production testing, staging deploys, production deploys, and a release request issue template; updated README deployment instructions. * Removed redundant build and deploy workflows; updated staging and production deploy workflows to use the main branch; cleaned up README. * Removed unused build-file and build-context inputs from deploy workflows.
1 parent 9607aa0 commit 3fe0d90

7 files changed

Lines changed: 187 additions & 67 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: 0 additions & 30 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
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: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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@main
38+
with:
39+
template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-python'
40+
environment: "production"
41+
version-bump: ${{ inputs.version-bump }}
42+
branch: ${{ inputs.branch }}
43+
run-database-tests: false
44+
seed: ${{ inputs.seed }}
45+
request_delay: ${{ inputs.request_delay }}
46+
max_concurrency: ${{ inputs.max_concurrency }}
47+
48+
secrets:
49+
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
50+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
51+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
52+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}
53+
TEST_API_ENDPOINT: ${{ secrets.TEST_API_ENDPOINT }}
54+
DB_USER: ${{ secrets.DB_USER }}
55+
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
56+
DB_HOST: ${{ secrets.DB_HOST }}
57+
DB_PORT: ${{ secrets.DB_PORT }}
58+
DB_NAME: ${{ secrets.DB_NAME }}
59+
GCP_DB_CREDS: ${{ secrets.GCP_DB_CREDS }}
60+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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@main
12+
with:
13+
template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python"
14+
build-platforms: "aws"
15+
environment: "staging"
16+
lfs: false
17+
secrets:
18+
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
19+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
20+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
21+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}

README.md

Lines changed: 4 additions & 3 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.
@@ -106,9 +110,6 @@ In order to develop, test and build the evaluation function, you need to have th
106110
### Repository Structure
107111

108112
```bash
109-
.github/workflows/
110-
build.yml # builds the public evaluation function image
111-
deploy.yml # deploys the evaluation function to Lambda Feedback
112113

113114
src/ # evaluation function source code
114115
Evaluation.lean # module containing the evaluation function

0 commit comments

Comments
 (0)