Move from mypy to ty
#605
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: Examples | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - renovate/** | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| cancel-in-progress: true | |
| group: >- | |
| ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| jobs: | |
| codeblocks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7 | |
| with: | |
| python-version: 3.13 | |
| - name: Cache pooch | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.cache/sleplet | |
| key: readme-${{ hashFiles('pyproject.toml') }} | |
| - name: Install dependencies | |
| run: uv sync --group readme | |
| - name: Run examples in the README | |
| run: uv run pytest --codeblocks .github README.md documentation | |
| examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7 | |
| with: | |
| python-version: 3.13 | |
| - name: Cache pooch | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.cache/sleplet | |
| key: examples-${{ hashFiles('pyproject.toml') }} | |
| - name: Install dependencies | |
| run: uv sync --group docs | |
| - name: Run examples in the examples folder | |
| run: >- | |
| find examples -name "*.py" -exec sh -c 'for f; do printf "\n$f\n"; uv | |
| run "$f" || exit 1; done' sh {} + |