Refactor trigger_analysis for improved result handling #16
This file contains hidden or 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
| # GitHub Actions CI Workflow for StockSense Agent | |
| # Validates code, tests, and Docker builds on every push/pull_request to main. | |
| name: CI - StockSense Agent | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test-and-validate: | |
| name: Run Tests and Validate Docker Images | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install All Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-backend.txt | |
| pip install -r requirements-frontend.txt | |
| pip install pytest pytest-cov | |
| - name: Run Test Suite | |
| env: | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| NEWSAPI_KEY: ${{ secrets.NEWSAPI_KEY }} | |
| run: pytest | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Validate Backend Docker Image | |
| run: docker build -f Dockerfile.backend -t stocksense-backend-ci . | |
| - name: Validate Frontend Docker Image | |
| run: docker build -f Dockerfile.frontend -t stocksense-frontend-ci . |