⬆️ Bump actions/checkout from 6 to 7 #98
Workflow file for this run
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: build | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pre-commit | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: ${{ runner.os }}-pre-commit-${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| uv sync --frozen | |
| echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH | |
| git config --global user.email "you@example.com" | |
| git config --global user.name "Your Name" | |
| git config --global init.defaultBranch main | |
| - name: with neither git nor pre-commit | |
| run: | | |
| GIT=$(which git) | |
| sudo chmod -x ${GIT} | |
| cookiecutter -v --no-input -f -o /tmp/cookie_python . project_slug=foo1-bar minimum_python_version=${{ matrix.python-version }} | |
| cd /tmp/cookie_python/foo1-bar | |
| uv sync --frozen | |
| uv run python -c "import foo1_bar; print(foo1_bar.__version__)" | |
| sudo chmod +x ${GIT} | |
| - name: with git only | |
| run: | | |
| cookiecutter -v --no-input -f -o /tmp/cookie_python . project_slug=foo2 minimum_python_version=${{ matrix.python-version }} | |
| cd /tmp/cookie_python/foo2 | |
| uv sync --frozen | |
| - name: with git and pre-commit | |
| run: | | |
| cookiecutter -v --no-input -f -o /tmp/cookie_python . project_slug=foo3 minimum_python_version=${{ matrix.python-version }} | |
| cd /tmp/cookie_python/foo3 | |
| uv sync --frozen --extra dev | |
| uv run python -c "import tests" | |
| uv run make -C docs html | |
| - name: upload generated projects | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cookie_python_${{ matrix.python-version }} | |
| path: /tmp/cookie_python |