Skip to content

Commit

Permalink
Update unit-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromehardaway authored Nov 11, 2024
1 parent 114bb2d commit aeea0d5
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,26 @@ 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: Run tests with coverage report
env:
TESTING: "true"
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
pytest --cov --cov-report=term-missing
- 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

0 comments on commit aeea0d5

Please sign in to comment.