diff --git a/template/.github/workflows/ci.yaml.jinja b/template/.github/workflows/ci.yaml.jinja index 6a19c0c2..8ee529b1 100644 --- a/template/.github/workflows/ci.yaml.jinja +++ b/template/.github/workflows/ci.yaml.jinja @@ -77,7 +77,13 @@ jobs: timeout-minutes: {% endraw %}{{ gha_medium_timeout_minutes }}{% raw %} env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} @@ -170,7 +176,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_exe_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} - name: Install python tooling diff --git a/template/.github/workflows/release.yaml.jinja b/template/.github/workflows/release.yaml.jinja index b5341b68..dfb53f59 100644 --- a/template/.github/workflows/release.yaml.jinja +++ b/template/.github/workflows/release.yaml.jinja @@ -157,7 +157,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} - name: Setup python @@ -313,7 +319,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} - name: Setup python diff --git a/template/.github/workflows/{% if not deploy_as_executable %}publish.yaml{% endif %}.jinja b/template/.github/workflows/{% if not deploy_as_executable %}publish.yaml{% endif %}.jinja index 3aee9a26..742ae764 100644 --- a/template/.github/workflows/{% if not deploy_as_executable %}publish.yaml{% endif %}.jinja +++ b/template/.github/workflows/{% if not deploy_as_executable %}publish.yaml{% endif %}.jinja @@ -67,7 +67,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} @@ -180,7 +186,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} - name: Setup python @@ -326,7 +338,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} - name: Setup python diff --git a/template/.github/workflows/{% if not deploy_as_executable %}publish_to_staging.yaml{% endif %}.jinja b/template/.github/workflows/{% if not deploy_as_executable %}publish_to_staging.yaml{% endif %}.jinja index 8d8aadc0..6a705008 100644 --- a/template/.github/workflows/{% if not deploy_as_executable %}publish_to_staging.yaml{% endif %}.jinja +++ b/template/.github/workflows/{% if not deploy_as_executable %}publish_to_staging.yaml{% endif %}.jinja @@ -41,7 +41,13 @@ jobs: env: UV_PYTHON: ${{ matrix.python-version }} - steps: + steps:{% endraw %}{% if use_windows_in_ci %} + - name: Allow long file paths + if: runner.os == 'Windows' + # Some tooling (e.g. vcrpy, syrupy) generates file names past the 260 character limit Windows + # defaults to. This has to happen before the checkout that writes those files. + run: git config --global core.longpaths true +{% endif %}{% raw %} - name: Checkout code uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %}