build(deps): bump https://github.com/zizmorcore/zizmor-pre-commit #401
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: {} | |
| jobs: | |
| self-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| with: | |
| cache-dependency-glob: cookiecutter.json | |
| # we need the git config setup here to make sure the subsequent git commit in each test works | |
| - name: setup fake git committer | |
| run: | | |
| git config --global user.email "fake@example.com" | |
| git config --global user.name "fake" | |
| - name: run template (default) | |
| run: | | |
| uvx cookiecutter --no-input -o /tmp . | |
| [[ -d /tmp/python-project/src/python_project ]] || { >&2 echo "not generated?"; exit 1; } | |
| cd /tmp/python-project | |
| git init . && git add . && git commit -m "Initial commit" | |
| make format | |
| git diff --exit-code || { >&2 echo "please format"; exit 1; } | |
| uv run prek run --all-files | |
| make lint | |
| make test | |
| make audit | |
| make build | |
| make doc | |
| cd .. && rm -rf /tmp/python-project | |
| - name: run template (no entry point) | |
| run: | | |
| uvx cookiecutter --no-input -o /tmp . entry_point='' | |
| [[ ! -f /tmp/python-project/python_project/__main__.py ]] || { >&2 echo "not expecting main"; exit 1; } | |
| cd /tmp/python-project | |
| git init . && git add . && git commit -m "Initial commit" | |
| make format | |
| git diff --exit-code || { >&2 echo "please format"; exit 1; } | |
| uv run prek run --all-files | |
| make lint | |
| make test | |
| make audit | |
| make build | |
| make doc | |
| cd .. && rm -rf /tmp/python-project | |
| - name: run template (namespace) | |
| run: | | |
| uvx cookiecutter --no-input -o /tmp . project_namespace_import=tob.r_and_e | |
| [[ -d /tmp/tob-r-and-e-python-project/src/tob/r_and_e/python_project ]] || { >&2 echo "not generated?"; exit 1; } | |
| cd /tmp/tob-r-and-e-python-project | |
| git init . && git add . && git commit -m "Initial commit" | |
| make format | |
| git diff --exit-code || { >&2 echo "please format"; exit 1; } | |
| uv run prek run --all-files | |
| make lint | |
| make test | |
| make audit | |
| make build | |
| make doc | |
| cd .. && rm -rf /tmp/tob-r-and-e-python-project | |
| - name: run template (namespace, library) | |
| run: | | |
| uvx cookiecutter --no-input -o /tmp . project_namespace_import=tob.r_and_e repo_type=library | |
| [[ -d /tmp/tob-r-and-e-python-project/src/tob/r_and_e/python_project ]] || { >&2 echo "not generated?"; exit 1; } | |
| [[ ! -f /tmp/tob-r-and-e-python-project/src/tob/r_and_e/python_project/_cli.py ]] || { >&2 echo "not expecting CLI module"; exit 1; } | |
| [[ ! -f /tmp/tob-r-and-e-python-project/src/tob/r_and_e/python_project/__main__.py ]] || { >&2 echo "not expecting main module"; exit 1; } | |
| cd /tmp/tob-r-and-e-python-project | |
| git init . && git add . && git commit -m "Initial commit" | |
| make format | |
| git diff --exit-code || { >&2 echo "please format"; exit 1; } | |
| uv run prek run --all-files | |
| make lint | |
| make test | |
| make audit | |
| make build | |
| make doc | |
| cd .. && rm -rf /tmp/tob-r-and-e-python-project | |
| - name: run template (namespace, short slug) | |
| run: | | |
| uvx cookiecutter --no-input -o /tmp . project_namespace_import=tob.r_and_e "project_name=Bit Trails" project_slug=bit-trails | |
| [[ -d /tmp/bit-trails/src/tob/r_and_e/bit_trails ]] || { >&2 echo "not generated?"; exit 1; } | |
| cd /tmp/bit-trails | |
| git init . && git add . && git commit -m "Initial commit" | |
| make format | |
| git diff --exit-code || { >&2 echo "please format"; exit 1; } | |
| uv run prek run --all-files | |
| make lint | |
| make test | |
| make audit | |
| make build | |
| make doc | |
| cd .. && rm -rf /tmp/bit-trails | |
| - name: run template (no docs) | |
| run: | | |
| uvx cookiecutter --no-input -o /tmp . documentation='none' | |
| [[ -d /tmp/python-project/src/python_project ]] || { >&2 echo "not generated?"; exit 1; } | |
| [[ ! -f /tmp/python-project/.github/workflows/docs.yml ]] || { >&2 echo "not expecting docs.yml"; exit 1; } | |
| cd /tmp/python-project | |
| git init . && git add . && git commit -m "Initial commit" | |
| make format | |
| git diff --exit-code || { >&2 echo "please format"; exit 1; } | |
| uv run prek run --all-files | |
| make lint | |
| make test | |
| make audit | |
| make build | |
| make doc | |
| cd .. && rm -rf /tmp/python-project |