Bump actions/checkout from 4 to 6 #18
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 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,ml]" --extra-index-url https://download.pytorch.org/whl/cpu | |
| - name: Ruff check | |
| run: ruff check . | |
| - name: Ruff format | |
| run: ruff format --check . | |
| - name: Mypy | |
| run: mypy cloudpilot | |
| - name: Bandit | |
| run: bandit -q -r cloudpilot -c pyproject.toml | |
| - name: Pip audit | |
| run: | | |
| pip freeze > freeze.txt | |
| pip-audit -r freeze.txt --desc on | |
| - name: Run tests with coverage | |
| run: | | |
| pytest --junitxml=junit.xml -q --cov=cloudpilot --cov=cli --cov-report=xml --cov-report=term | |
| - name: Upload coverage artifact | |
| if: matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-xml | |
| path: coverage.xml |