Fix setup-uv cache warning by specifying pyproject.toml as cache key #201
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: Mdformat | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| mdformat: | |
| name: Markdown formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: '3.12' | |
| enable-cache: true | |
| cache-dependency-glob: "**/pyproject.toml" | |
| - name: Create virtual environment | |
| run: | | |
| uv venv --clear .venv | |
| echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: uv pip install "mdformat>=0.7.0" "mdformat-myst>=0.1.5" | |
| - name: Run mdformat (check only) | |
| run: | | |
| mdformat --check --wrap no --number docs/ | |
| mdformat --check --wrap no --number *.md |