Skip to content

Update github actions #26

Update github actions

Update github actions #26

Workflow file for this run

name: Run tests
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Set environment variable from secret
- name: Set OPENAI_API_KEY environment variable
env:
OPENAI_API_SECRET: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_VERSION: ${{ secrets.OPENAI_API_VERSION }}
GCP_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
run: |
echo $GCP_CREDENTIALS_JSON > /tmp/credentials.json
echo "OPENAI_API_KEY=$OPENAI_API_SECRET" >> $GITHUB_ENV
echo "GOOGLE_APPLICATION_CREDENTIALS=/tmp/credentials.json" >> $GITHUB_ENV
echo "OPENAI_API_VERSION=$OPENAI_API_VERSION" >> $GITHUB_ENV
echo "AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> $GITHUB_ENV
echo "AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> $GITHUB_ENV
# Step 2: Checkout repo recursively
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install all dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Run tests
run: pytest tests/test_gcloud.py -s