fix: CI pipeline — add PYTHONPATH for test discovery, remove deploy w… #3
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: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run tests | |
| run: PYTHONPATH=src python -m pytest tests/ -v --tb=short | |
| env: | |
| PYTHONPATH: src | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Lint | |
| run: ruff check src/ tests/ | |
| terraform-validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: hashicorp/setup-terraform@v3 | |
| - name: Terraform init | |
| run: cd terraform && terraform init -backend=false | |
| - name: Terraform validate | |
| run: cd terraform && terraform validate | |
| - name: Terraform fmt check | |
| run: cd terraform && terraform fmt -check -recursive |