From 18d37c79a166cac630b5ff93e3bf714b7834fac1 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 6 May 2026 11:57:35 +0100 Subject: [PATCH 1/3] Added GitHub workflows for testing, staging, and production deployments; included a release request issue template and updated README. --- .github/ISSUE_TEMPLATE/release-request.yml | 53 ++++++++++++++++++ .github/workflows/pre_production_tests.yml | 49 +++++++++++++++++ .github/workflows/production-deploy.yml | 62 ++++++++++++++++++++++ .github/workflows/staging-deploy.yml | 23 ++++++++ README.md | 4 ++ 5 files changed, 191 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/release-request.yml create mode 100644 .github/workflows/pre_production_tests.yml create mode 100644 .github/workflows/production-deploy.yml create mode 100644 .github/workflows/staging-deploy.yml diff --git a/.github/ISSUE_TEMPLATE/release-request.yml b/.github/ISSUE_TEMPLATE/release-request.yml new file mode 100644 index 0000000..2ed9717 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release-request.yml @@ -0,0 +1,53 @@ +name: "Release Request" +description: "Request a deployment by specifying the evaluation function, changes, target commit/branch, and test confirmation." +title: "Release Request" +labels: + - release + - deployment +assignees: [] +body: + - type: textarea + id: description_of_changes + attributes: + label: Description of changes + description: "Summarize what is changing and why. Include links to PRs, issues, or changelogs." + placeholder: | + - What changed: + - Why: + - Related PRs/Issues: #123, #456 + render: markdown + validations: + required: true + + - type: input + id: branch_to_deploy + attributes: + label: Branch to deploy + description: | + Specify Branch name to deploy. + placeholder: "e.g., release/2025-09-29" + validations: + required: true + + - type: dropdown + id: version-bump + attributes: + label: "๐Ÿš€ What kind of update is this?" + description: "Tell us how significant this change is. This helps us set the correct new version number." + options: + - "Patch: A small fix for a bug. It won't break anything for existing users. (e.g., 1.2.3 โž” 1.2.4)" + - "Minor: Adds a new feature, but doesn't change how existing ones work. A safe update. (e.g., 1.2.3 โž” 1.3.0)" + - "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)" + default: 0 + validations: + required: true + + - type: markdown + attributes: + value: | + --- + ### โšก Click the Link Below to Run the Workflow + + Clicking the link will take you to the Actions page. You will need to click the **"Run workflow"** button there to start the process. + + ## [โžก๏ธ Go to Workflow Run Page](../actions/workflows/production-deploy.yml) \ No newline at end of file diff --git a/.github/workflows/pre_production_tests.yml b/.github/workflows/pre_production_tests.yml new file mode 100644 index 0000000..2daabd1 --- /dev/null +++ b/.github/workflows/pre_production_tests.yml @@ -0,0 +1,49 @@ +name: Run Pre-Production Validation Tests + +on: + workflow_dispatch: + inputs: + eval_function: + type: string + description: "The name of the evaluation function to test" + required: true + sql_limit: + type: number + description: "The maximum number of SQL test cases to run" + required: false + default: 500 + seed: + type: string + description: "Random seed for reproducible sampling (float in [-1.0, 1.0]). Leave blank to auto-generate." + required: false + default: '' + request_delay: + type: string + description: "Delay (seconds) between dispatching requests" + required: false + default: '0' + max_concurrency: + type: string + description: "Max concurrent requests (lower for GPT-backed functions)" + required: false + default: '5' + +jobs: + run-pre-production-tests: + name: ๐Ÿงช Run Staging Validation Tests + uses: lambda-feedback/Database-Testing/.github/workflows/test_evaluation_function.yml@main + with: + eval_function: ${{ inputs.eval_function }} + sql_limit: ${{ inputs.sql_limit }} + seed: ${{ inputs.seed }} + request_delay: ${{ inputs.request_delay }} + max_concurrency: ${{ inputs.max_concurrency }} + secrets: + TEST_API_ENDPOINT: ${{ secrets.TEST_API_ENDPOINT }} + DB_USER: ${{ secrets.DB_USER }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_HOST: ${{ secrets.DB_HOST }} + DB_PORT: ${{ secrets.DB_PORT }} + DB_NAME: ${{ secrets.DB_NAME }} + GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_DB_CREDS }} + GCP_PROJECT_ID: ${{ secrets.GCP_DB_PROJECT_ID }} \ No newline at end of file diff --git a/.github/workflows/production-deploy.yml b/.github/workflows/production-deploy.yml new file mode 100644 index 0000000..cdcc6c4 --- /dev/null +++ b/.github/workflows/production-deploy.yml @@ -0,0 +1,62 @@ +name: Deploy to Production + +on: + workflow_dispatch: + inputs: + version-bump: + description: 'Version bump type' + required: true + type: choice + options: + - patch + - minor + - major + default: patch + branch: + description: 'Branch to release from' + required: true + type: string + default: 'main' + seed: + description: 'Random seed for reproducible sampling (float in [-1.0, 1.0]). Leave blank to auto-generate.' + required: false + type: string + default: '' + request_delay: + description: 'Delay (seconds) between dispatching requests' + required: false + type: string + default: '0' + max_concurrency: + description: 'Max concurrent requests (lower for GPT-backed functions)' + required: false + type: string + default: '5' +jobs: + deploy: + uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request + with: + template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-python' + build-file: "app/Dockerfile" + build-context: "./app" + environment: "production" + version-bump: ${{ inputs.version-bump }} + branch: ${{ inputs.branch }} + run-database-tests: false + seed: ${{ inputs.seed }} + request_delay: ${{ inputs.request_delay }} + max_concurrency: ${{ inputs.max_concurrency }} + + secrets: + aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }} + aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}} + function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}} + gcp_credentials: ${{ secrets.GCP_DEPLOY }} + TEST_API_ENDPOINT: ${{ secrets.TEST_API_ENDPOINT }} + DB_USER: ${{ secrets.DB_USER }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} + DB_HOST: ${{ secrets.DB_HOST }} + DB_PORT: ${{ secrets.DB_PORT }} + DB_NAME: ${{ secrets.DB_NAME }} + GCP_DB_CREDS: ${{ secrets.GCP_DB_CREDS }} + GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} \ No newline at end of file diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml new file mode 100644 index 0000000..2fd1f08 --- /dev/null +++ b/.github/workflows/staging-deploy.yml @@ -0,0 +1,23 @@ +name: Deploy to Staging + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request + with: + template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python" + build-file: "app/Dockerfile" + build-context: "./app" + build-platforms: "aws" + environment: "staging" + lfs: false + secrets: + aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }} + aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}} + function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}} + gcp_credentials: ${{ secrets.GCP_DEPLOY }} diff --git a/README.md b/README.md index 7ba9dd4..a18e75b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ This repository contains the boilerplate code needed to create a containerized evaluation function written in Wolfram Language. +## Deployment +[![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) +To deploy to production, update the README button above to point to the correct repository. + ## Quickstart This chapter helps you to quickly set up a new Wolfram evaluation function using this template repository. From c54efd6b436e95b24bb5c3762460adf51f555cc3 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 6 May 2026 12:10:15 +0100 Subject: [PATCH 2/3] Removed unused build and deploy workflows; updated remaining workflows to reference the main branch configuration; cleaned up README. --- .github/workflows/build.yml | 18 ------------------ .github/workflows/deploy.yml | 20 -------------------- .github/workflows/production-deploy.yml | 2 +- .github/workflows/staging-deploy.yml | 2 +- README.md | 11 ----------- 5 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 32333f4..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build Evaluation Function Image - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -jobs: - build: - uses: lambda-feedback/evaluation-function-workflows/.github/workflows/build.yml@main - with: - build-target: final - permissions: - contents: read - id-token: write - packages: write diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index adb50ca..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Deploy to Lambda Feedback - -on: - push: - branches: - - main - - master - workflow_dispatch: - -jobs: - deploy: - uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main - with: - template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-wolfram' - build-platforms: 'gcp' - secrets: - aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }} - aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}} - function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}} - gcp_credentials: ${{ secrets.GCP_DEPLOY }} diff --git a/.github/workflows/production-deploy.yml b/.github/workflows/production-deploy.yml index cdcc6c4..904b583 100644 --- a/.github/workflows/production-deploy.yml +++ b/.github/workflows/production-deploy.yml @@ -34,7 +34,7 @@ on: default: '5' jobs: deploy: - uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request + uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main with: template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-python' build-file: "app/Dockerfile" diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml index 2fd1f08..6de9178 100644 --- a/.github/workflows/staging-deploy.yml +++ b/.github/workflows/staging-deploy.yml @@ -8,7 +8,7 @@ on: jobs: deploy: - uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request + uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main with: template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python" build-file: "app/Dockerfile" diff --git a/README.md b/README.md index a18e75b..9e7513d 100644 --- a/README.md +++ b/README.md @@ -130,17 +130,6 @@ shimmy -c "wolframscript" -a "-f" -a "evaluation_function.wl" -i file - [Wolfram Engine](https://www.wolfram.com/engine/) - [Wolfram Engine License](#development-license) -### Repository Structure - -```bash -.github/workflows/ - build.yml # builds the public evaluation function image - deploy.yml # deploys the evaluation function to Lambda Feedback - -evaluation_function.wl # evaluation function source code - -config.json # evaluation function deployment configuration file -``` ### Development Workflow From 00432a5745621aba7db7e315e624fdc94a8e409d Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Wed, 6 May 2026 14:15:10 +0100 Subject: [PATCH 3/3] Removed redundant build-file and build-context parameters from staging and production deploy workflows. --- .github/workflows/production-deploy.yml | 2 -- .github/workflows/staging-deploy.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/production-deploy.yml b/.github/workflows/production-deploy.yml index 904b583..901c8d9 100644 --- a/.github/workflows/production-deploy.yml +++ b/.github/workflows/production-deploy.yml @@ -37,8 +37,6 @@ jobs: uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main with: template-repository-name: 'lambda-feedback/evaluation-function-boilerplate-python' - build-file: "app/Dockerfile" - build-context: "./app" environment: "production" version-bump: ${{ inputs.version-bump }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml index 6de9178..6600ac0 100644 --- a/.github/workflows/staging-deploy.yml +++ b/.github/workflows/staging-deploy.yml @@ -11,8 +11,6 @@ jobs: uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@main with: template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python" - build-file: "app/Dockerfile" - build-context: "./app" build-platforms: "aws" environment: "staging" lfs: false