fix tests #64
Workflow file for this run
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
name: Python Tests | |
on: | |
push: | |
branches: [ main, jeromehardaway/update-code-clean ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.15' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install pytest pytest-cov | |
- name: Create temporary secrets.toml | |
# This creates a temporary secrets.toml file using the OPENAI_API_KEY from GitHub Secrets | |
run: | | |
mkdir -p ~/.streamlit | |
echo -e "[openai]\nOPENAI_API_KEY = \"${{ secrets.OPENAI_API_KEY }}\"" > ~/.streamlit/secrets.toml | |
- name: Run tests with coverage report | |
env: | |
TESTING: "true" | |
run: | | |
pytest --cov --cov-report=term-missing |