name: Connector Tests on: schedule: # This cron expression runs the job daily at 16:00 UTC (9am PT) - cron: "0 16 * * *" env: # Bedrock AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} # OpenAI OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} jobs: connectors-check: # See https://runs-on.com/runners/linux/ runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"] env: PYTHONPATH: ./backend steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.11" cache: "pip" cache-dependency-path: | backend/requirements/default.txt backend/requirements/dev.txt - name: Install Dependencies run: | python -m pip install --upgrade pip pip install --retries 5 --timeout 30 -r backend/requirements/default.txt pip install --retries 5 --timeout 30 -r backend/requirements/dev.txt - name: Run Tests shell: script -q -e -c "bash --noprofile --norc -eo pipefail {0}" run: | py.test -o junit_family=xunit2 -xv --ff backend/tests/daily/llm py.test -o junit_family=xunit2 -xv --ff backend/tests/daily/embedding - name: Alert on Failure if: failure() && github.event_name == 'schedule' env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} run: | curl -X POST \ -H 'Content-type: application/json' \ --data '{"text":"Scheduled Model Tests failed! Check the run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}' \ $SLACK_WEBHOOK