samples_connections_connection #669
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
# This code is autogenerated. | |
# Code is generated by running custom script: python3 readme.py | |
# Any manual changes to this file may cause incorrect behavior. | |
# Any manual changes will be overwritten if the code is regenerated. | |
name: samples_connections_connection | |
on: | |
schedule: | |
- cron: "13 22 * * *" # Every day starting at 6:13 BJT | |
pull_request: | |
branches: [ main ] | |
paths: [ examples/connections/**, examples/*requirements.txt, .github/workflows/samples_connections_connection.yml ] | |
workflow_dispatch: | |
env: | |
IS_IN_CI_PIPELINE: "true" | |
jobs: | |
samples_connections_connection: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Azure Login | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Setup Python 3.9 environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Prepare requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ${{ github.workspace }}/examples/requirements.txt | |
pip install -r ${{ github.workspace }}/examples/dev_requirements.txt | |
- name: Create Aoai Connection | |
run: pf connection create -f ${{ github.workspace }}/examples/connections/azure_openai.yml --set api_key="${{ secrets.AOAI_API_KEY_TEST }}" api_base="${{ secrets.AOAI_API_ENDPOINT_TEST }}" | |
- name: Test Notebook | |
working-directory: examples/connections | |
run: | | |
papermill -k python connection.ipynb connection.output.ipynb | |
- name: Upload artifact | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifact | |
path: examples/connections |