fix: add CACHE_MISS to Cache docstring example import #101
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" | |
| tags: | |
| - "v*" | |
| release: | |
| types: [created] | |
| pull_request: | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up UV | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "${{ matrix.python-version }}" | |
| - name: Lint | |
| run: | | |
| make lint | |
| - name: Test | |
| run: | | |
| make test | |
| - name: Doc | |
| run: | | |
| make doc | |
| - name: Upload site doc as an artifact | |
| if: matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: site | |
| path: site/ | |
| - name: Check that there are no dirty files | |
| run: | | |
| make no-dirty | |
| - name: Check that there are no dirty files (after cleaning) | |
| run: | | |
| make clean && make no-dirty | |
| mergify-ci-status: # this is a special job for mergify | |
| runs-on: ubuntu-24.04 | |
| needs: ["ci"] | |
| steps: | |
| - name: Status | |
| run: | | |
| echo "OK" | |
| publish_pypi: | |
| runs-on: ubuntu-24.04 | |
| needs: ["ci"] | |
| if: github.event_name == 'release' && github.event.action == 'created' | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # we need this because fetch-tags=true and because of a GHA bug: https://github.com/actions/checkout/issues/1471 | |
| fetch-tags: true # important for the dunamai to get the "good" version | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Build | |
| run: | | |
| make build | |
| - name: Publish | |
| run: | | |
| make publish | |
| env: | |
| UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| githubpages: | |
| runs-on: ubuntu-24.04 | |
| needs: ci | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| environment: | |
| name: github-pages | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - name: Download site doc artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: site | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire repository | |
| path: "." | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |