Fix CI: skip venv activation in GitHub Actions #2
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
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Verify Python environment | |
| run: | | |
| python --version | |
| pip --version | |
| pip list | |
| - name: Run API health check (success case) | |
| run: | | |
| bash projects/01_api_health_check/bash/run.sh https://httpbin.org/status/200 | |
| - name: Verify health check detects failures | |
| run: | | |
| # This should fail and return exit code 1 | |
| set +e # Temporarily allow failures | |
| bash projects/01_api_health_check/bash/run.sh https://httpbin.org/status/500 || exit_code=$? | |
| set -e # Re-enable exit on error | |
| if [ "$exit_code" != "1" ]; then | |
| echo "Health check should exit with code 1 on failure, got: $exit_code" | |
| exit 1 | |
| fi | |
| echo "✓ Health check correctly exits non-zero on failure" |