Repository navigation
Merge pull request #3 from Trojan3877/copilot/upgrade-trojanchat-files #41
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", "copilot/**"] | |
| pull_request: | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Lint (flake8) | |
| run: flake8 app/ tests/ --max-line-length=100 | |
| - name: Format check (black) | |
| run: black --check app/ tests/ --line-length=100 | |
| - name: Type check (mypy) | |
| run: mypy app/ --ignore-missing-imports | |
| - name: Security scan (bandit) | |
| run: bandit -r app/ -ll -q | |
| - name: Run tests | |
| run: pytest tests/ -v --tb=short |