Update README.md #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
| # ci.yml | |
| # ======= | |
| # Continuous Integration workflow. | |
| # | |
| # What is CI (Continuous Integration) ? | |
| # CI means that every time someone pushes code or opens a pull request, | |
| # GitHub automatically runs the tests. This catches bugs before they | |
| # reach the main branch. | |
| # | |
| # GitHub Actions reads this file and executes the steps defined below | |
| # on a fresh virtual machine hosted by GitHub (free for public repos). | |
| name: CI | |
| # When to run this workflow | |
| on: | |
| push: | |
| branches: [main] # On every push to the main branch | |
| pull_request: | |
| branches: [main] # On every pull request targeting main | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest # Use a fresh Ubuntu virtual machine | |
| steps: | |
| # Step 1 : Download the repository code onto the virtual machine | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Step 2 : Install Python on the virtual machine | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| # Step 3 : Install project dependencies | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install anthropic pytest | |
| # Step 4 : Run the test suite | |
| # The ANTHROPIC_API_KEY is read from GitHub repository secrets. | |
| # Tests use mocking, so no real API call is made - the key is a placeholder here. | |
| - name: Run tests | |
| run: python -m pytest src/test/ -v | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |