From c46a114949d888547efd5f0fde83531d4cc820ce Mon Sep 17 00:00:00 2001 From: Mohd Aquib Date: Thu, 9 May 2024 12:52:05 +0530 Subject: [PATCH] Update ci-cd.yaml --- .github/workflows/ci-cd.yaml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index d8ca26c..c94daba 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -18,32 +18,28 @@ jobs: 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: Set Google API Key - env: - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} - - name: Set HuggingFace API Key - env: - HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }} - - name: Set Groq API Key - env: - GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} - - name: Set MongoDB Credentials - env: - MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }} - MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }} - MONGO_DBNAME: ${{ secrets.MONGO_DBNAME }} - MONGO_COLLECTION: ${{ secrets.MONGO_COLLECTION }} - - name: Set LangChain API Key - env: - LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }} + + - name: Set Environment Variables + run: | + echo "GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }}" >> $GITHUB_ENV + echo "HUGGINGFACE_API_KEY=${{ secrets.HUGGINGFACE_API_KEY }}" >> $GITHUB_ENV + echo "GROQ_API_KEY=${{ secrets.GROQ_API_KEY }}" >> $GITHUB_ENV + echo "MONGO_USERNAME=${{ secrets.MONGO_USERNAME }}" >> $GITHUB_ENV + echo "MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }}" >> $GITHUB_ENV + echo "MONGO_DBNAME=${{ secrets.MONGO_DBNAME }}" >> $GITHUB_ENV + echo "MONGO_COLLECTION=${{ secrets.MONGO_COLLECTION }}" >> $GITHUB_ENV + echo "LANGCHAIN_API_KEY=${{ secrets.LANGCHAIN_API_KEY }}" >> $GITHUB_ENV + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt + - name: Run Tests run: | pytest test_main.py