update ai tool instruction #58
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: {} | |
| jobs: | |
| ci: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12"] | |
| uv-version: ["0.8.14"] | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: ${{ matrix.uv-version }} | |
| - name: Install Task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.38.0 | |
| - uses: actions/cache@v4 | |
| name: Cache uv dependencies | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| .venv | |
| key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-uv- | |
| - name: Install dependencies | |
| run: uv sync --all-groups | |
| - uses: pre-commit/action@v3.0.1 | |
| - name: Run the automated tests(using pytest) | |
| run: uv run pytest ./src/test -sv --durations=0 | |
| - uses: pyupio/safety-action@v1 | |
| if: runner.os == 'Linux' | |
| name: Run Safety check(using safety) | |
| with: | |
| api-key: ${{ secrets.SAFETY_API_KEY }} | |
| args: --detailed-output # To always see detailed output from this action | |
| - name: Check for dependency updates | |
| id: check_updates | |
| run: | | |
| echo "Checking for dependency updates..." | |
| echo "Current dependency constraints:" | |
| grep -A 10 "^dependencies" pyproject.toml || true | |
| echo "" | |
| echo "Current dev dependencies:" | |
| grep -A 10 "^\[dependency-groups\]" pyproject.toml || true | |
| echo "" | |
| echo "💡 To upgrade dependencies within constraints, run: uv sync --upgrade" | |
| echo "💡 To check for newer versions, manually review PyPI for each package" | |
| echo "💡 Remember to update ~= constraints in pyproject.toml for new minor versions" | |
| # ref: https://github.com/astral-sh/setup-uv |