Update ci-cd.yaml #6
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: Run Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
name: Test FastAPI Application | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Set Google API Key | ||
env: | ||
GOOGLE_API_KEY: ${{ evn.GOOGLE_API_KEY }} | ||
Check failure on line 35 in .github/workflows/ci-cd.yaml
|
||
HUGGINGFACE_API_KEY: ${{ env.HUGGINGFACE_API_KEY }} | ||
MONGO_USERNAME: ${{ evn.MONGO_USERNAME }} | ||
MONGO_PASSWORD: ${{ evn.MONGO_PASSWORD }} | ||
MONGO_DBNAME: ${{ evn.MONGO_DBNAME }} | ||
MONGO_COLLECTION: ${{ evn.MONGO_COLLECTION }} | ||
run: | | ||
echo "Google API Key: Success!!!" | ||
- name: Run Tests | ||
run: | | ||
pytest test_main.py |