Fixing NULL handling error in SQL generation (#314) #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) Microsoft Corporation. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions | |
name: Build and deploy Web App - lst-bench | |
on: | |
push: | |
paths: | |
- metrics/** | |
- run/** | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
AZURE_WEBAPP_NAME: lst-bench | |
WORKING_DIRECTORY: './metrics/app' | |
STARTUP_COMMAND: 'python -m streamlit run main.py --server.port 8000 --server.address 0.0.0.0 --client.toolbarMode minimal' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Set up Python version' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: 'Create and start virtual environment' | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
- name: 'Install dependencies' | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
run: | | |
pip install setuptools | |
pip install -r requirements.txt | |
- name: 'Copy .duckdb files from ./run/' | |
run: | | |
find ./run -type f -name "*.duckdb" -exec cp {} ${{ env.WORKING_DIRECTORY }} \; | |
- name: Zip artifact for deployment | |
working-directory: ${{ env.WORKING_DIRECTORY }} | |
run: zip release.zip ./* -r | |
- name: Upload artifact for deployment jobs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-app | |
path: | | |
${{ env.WORKING_DIRECTORY }}/release.zip | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: 'webapp-deploy' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
permissions: | |
id-token: write #This is required for requesting the JWT | |
steps: | |
- name: Download artifact from build job | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-app | |
path: . | |
- name: Unzip artifact for deployment | |
run: unzip release.zip | |
- name: Login to Azure | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_33D9610570044F3DA4CC10BFC44E822C }} | |
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_B6D8A47890014FE18CA30533FD44F9A3 }} | |
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_16D6B2652AF543ADA2A0CBFD17A3F482 }} | |
- name: 'Deploy to Azure Web App' | |
uses: azure/webapps-deploy@v3 | |
id: deploy-to-webapp | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
startup-command: ${{ env.STARTUP_COMMAND }} |