From beda96e5f569c99db46b487471dcf2751a60937c Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Wed, 22 Jul 2026 18:50:03 -0400 Subject: [PATCH 1/6] Add no-commit-to-branch prek hook --- src/github_actions.rs | 54 +++++++------------ src/project_generator.rs | 1 + ...ts__save_ci_testing_fastapi_file_pyo3.snap | 2 +- ..._save_ci_testing_linux_only_file_pyo3.snap | 2 +- ..._testing_linux_only_file_pyo3_pyrefly.snap | 2 +- ...s__save_ci_testing_multi_os_file_pyo3.snap | 2 +- ...ests__save_setuptools_ci_fastapi_file.snap | 2 +- ...setuptools_ci_testing_linux_only_file.snap | 2 +- ...ls_ci_testing_linux_only_file_pyrefly.snap | 2 +- ...e_setuptools_ci_testing_multi_os_file.snap | 2 +- ...ests__save_uv_ci_testing_fastapi_file.snap | 2 +- ...s__save_uv_ci_testing_linux_only_file.snap | 2 +- ...uv_ci_testing_linux_only_file_pyrefly.snap | 2 +- ...sts__save_uv_ci_testing_multi_os_file.snap | 2 +- ...generator__tests__save_prek_toml_file.snap | 2 +- ...r__tests__save_prek_toml_file_pyrefly.snap | 2 +- 16 files changed, 33 insertions(+), 50 deletions(-) diff --git a/src/github_actions.rs b/src/github_actions.rs index 79adf662..e9e8915c 100644 --- a/src/github_actions.rs +++ b/src/github_actions.rs @@ -15,6 +15,15 @@ fn build_actions_python_test_versions(github_action_python_test_versions: &[Stri .join(", ") } +fn create_prek_skip(type_checker: &TypeChecker) -> String { + let mut prek_skip = String::from("\n env:\n SKIP: no-commit-to-branch"); + if let TypeChecker::Pyrefly = type_checker { + prek_skip.push_str(",pyrefly-check"); + } + + prek_skip +} + fn create_setuptools_ci_testing_linux_only_file( source_dir: &str, min_python_version: &str, @@ -26,10 +35,7 @@ fn create_setuptools_ci_testing_linux_only_file( TypeChecker::Mypy => format!("mypy {source_dir} tests"), TypeChecker::Pyrefly => "pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); format!( @@ -102,10 +108,7 @@ fn create_setuptools_ci_testing_fastapi_file( TypeChecker::Mypy => format!("mypy {source_dir} tests"), TypeChecker::Pyrefly => "pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); format!( @@ -203,10 +206,7 @@ fn create_uv_ci_testing_linux_only_file( TypeChecker::Mypy => format!("uv run mypy {source_dir} tests"), TypeChecker::Pyrefly => "uv run pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); format!( @@ -281,10 +281,7 @@ fn create_uv_ci_testing_fastapi_file( TypeChecker::Mypy => format!("uv run mypy {source_dir} tests"), TypeChecker::Pyrefly => "uv run pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); format!( @@ -387,10 +384,7 @@ fn create_ci_testing_linux_only_file_pyo3( (Pyo3PythonManager::Setuptools, TypeChecker::Mypy) => format!("mypy {source_dir} tests"), (Pyo3PythonManager::Setuptools, TypeChecker::Pyrefly) => "pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); match pyo3_python_manager { Pyo3PythonManager::Uv => format!( @@ -591,10 +585,7 @@ fn create_ci_testing_fastapi_file_pyo3( (Pyo3PythonManager::Setuptools, TypeChecker::Mypy) => format!("mypy {source_dir} tests"), (Pyo3PythonManager::Setuptools, TypeChecker::Pyrefly) => "pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); match pyo3_python_manager { Pyo3PythonManager::Uv => format!( @@ -940,10 +931,7 @@ fn create_setuptools_ci_testing_multi_os_file( TypeChecker::Mypy => format!("mypy {source_dir} tests"), TypeChecker::Pyrefly => "pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); format!( @@ -1019,10 +1007,7 @@ fn create_ci_testing_multi_os_file_pyo3( (Pyo3PythonManager::Setuptools, TypeChecker::Mypy) => format!("mypy {source_dir} tests"), (Pyo3PythonManager::Setuptools, TypeChecker::Pyrefly) => "pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); match pyo3_python_manager { Pyo3PythonManager::Uv => format!( @@ -1221,10 +1206,7 @@ fn create_uv_ci_testing_multi_os_file( TypeChecker::Mypy => format!("uv run mypy {source_dir} tests"), TypeChecker::Pyrefly => "uv run pyrefly check".to_string(), }; - let prek_skip = match type_checker { - TypeChecker::Mypy => "", - TypeChecker::Pyrefly => "\n env:\n SKIP: pyrefly-check", - }; + let prek_skip = create_prek_skip(type_checker); let type_checker = type_checker.to_string(); format!( diff --git a/src/project_generator.rs b/src/project_generator.rs index 997506a0..8cdabd1d 100644 --- a/src/project_generator.rs +++ b/src/project_generator.rs @@ -255,6 +255,7 @@ hooks = [ {{ id = "check-toml" }}, {{ id = "check-yaml" }}, {{ id = "end-of-file-fixer" }}, + {{ id = "no-commit-to-branch" }}, {{ id = "trailing-whitespace" }}, ] "#, diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap index 504aea3d..87499c84 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap index 76149a6c..3e56179c 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap index f56a80ef..c214703d 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap index a7ddb63a..8d7c8084 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap index 1ee6dfe4..ffea2fe9 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: python -m pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: python -m pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap index cdb24aff..b8597a67 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap index 8230d17b..ae72149f 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: pyrefly check\n run: pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: pyrefly check\n run: pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap index b6ef9c60..427334fe 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap index a16279a7..6c602bdc 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap index 75d8cbc1..f44bc108 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap index fcbd173e..c344af2f 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap index 936f665a..5a32696f 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_prek_toml_file.snap b/src/snapshots/python_project__project_generator__tests__save_prek_toml_file.snap index 53ce6297..b4d10944 100644 --- a/src/snapshots/python_project__project_generator__tests__save_prek_toml_file.snap +++ b/src/snapshots/python_project__project_generator__tests__save_prek_toml_file.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[update]\nexclude_tags = [\"*-{alpha,beta,dev,rc}*\", \"*.{alpha,beta,dev,rc}*\"]\n\n[[repos]]\nrepo = \"builtin\"\nhooks = [\n { id = \"check-added-large-files\" },\n { id = \"check-toml\" },\n { id = \"check-yaml\" },\n { id = \"end-of-file-fixer\" },\n { id = \"trailing-whitespace\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/pre-commit/pre-commit-hooks\"\nrev = \"v6.0.0\"\nhooks = [\n { id = \"debug-statements\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/pre-commit/mirrors-mypy\"\nrev = \"v1.18.2\"\nhooks = [\n { id = \"mypy\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/astral-sh/ruff-pre-commit\"\nrev = \"v0.14.4\"\nhooks = [\n { id = \"ruff-check\", args = [\"--fix\", \"--exit-non-zero-on-fix\"] },\n { id = \"ruff-format\" },\n]\n" +"[update]\nexclude_tags = [\"*-{alpha,beta,dev,rc}*\", \"*.{alpha,beta,dev,rc}*\"]\n\n[[repos]]\nrepo = \"builtin\"\nhooks = [\n { id = \"check-added-large-files\" },\n { id = \"check-toml\" },\n { id = \"check-yaml\" },\n { id = \"end-of-file-fixer\" },\n { id = \"no-commit-to-branch\" },\n { id = \"trailing-whitespace\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/pre-commit/pre-commit-hooks\"\nrev = \"v6.0.0\"\nhooks = [\n { id = \"debug-statements\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/pre-commit/mirrors-mypy\"\nrev = \"v1.18.2\"\nhooks = [\n { id = \"mypy\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/astral-sh/ruff-pre-commit\"\nrev = \"v0.14.4\"\nhooks = [\n { id = \"ruff-check\", args = [\"--fix\", \"--exit-non-zero-on-fix\"] },\n { id = \"ruff-format\" },\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_prek_toml_file_pyrefly.snap b/src/snapshots/python_project__project_generator__tests__save_prek_toml_file_pyrefly.snap index 33fee673..614a52f0 100644 --- a/src/snapshots/python_project__project_generator__tests__save_prek_toml_file_pyrefly.snap +++ b/src/snapshots/python_project__project_generator__tests__save_prek_toml_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[update]\nexclude_tags = [\"*-{alpha,beta,dev,rc}*\", \"*.{alpha,beta,dev,rc}*\"]\n\n[[repos]]\nrepo = \"builtin\"\nhooks = [\n { id = \"check-added-large-files\" },\n { id = \"check-toml\" },\n { id = \"check-yaml\" },\n { id = \"end-of-file-fixer\" },\n { id = \"trailing-whitespace\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/pre-commit/pre-commit-hooks\"\nrev = \"v6.0.0\"\nhooks = [\n { id = \"debug-statements\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/facebook/pyrefly-pre-commit\"\nrev = \"1.1.1\"\nhooks = [\n {\n id = \"pyrefly-check\",\n name = \"pyrefly\",\n pass_filenames = false,\n language = \"system\",\n entry = \"uv run pyrefly check\"\n }\n]\n\n[[repos]]\nrepo = \"https://github.com/astral-sh/ruff-pre-commit\"\nrev = \"v0.14.4\"\nhooks = [\n { id = \"ruff-check\", args = [\"--fix\", \"--exit-non-zero-on-fix\"] },\n { id = \"ruff-format\" },\n]\n" +"[update]\nexclude_tags = [\"*-{alpha,beta,dev,rc}*\", \"*.{alpha,beta,dev,rc}*\"]\n\n[[repos]]\nrepo = \"builtin\"\nhooks = [\n { id = \"check-added-large-files\" },\n { id = \"check-toml\" },\n { id = \"check-yaml\" },\n { id = \"end-of-file-fixer\" },\n { id = \"no-commit-to-branch\" },\n { id = \"trailing-whitespace\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/pre-commit/pre-commit-hooks\"\nrev = \"v6.0.0\"\nhooks = [\n { id = \"debug-statements\" },\n]\n\n[[repos]]\nrepo = \"https://github.com/facebook/pyrefly-pre-commit\"\nrev = \"1.1.1\"\nhooks = [\n {\n id = \"pyrefly-check\",\n name = \"pyrefly\",\n pass_filenames = false,\n language = \"system\",\n entry = \"uv run pyrefly check\"\n }\n]\n\n[[repos]]\nrepo = \"https://github.com/astral-sh/ruff-pre-commit\"\nrev = \"v0.14.4\"\nhooks = [\n { id = \"ruff-check\", args = [\"--fix\", \"--exit-non-zero-on-fix\"] },\n { id = \"ruff-format\" },\n]\n" From 0aae08817adbd1e4a1d5ed993f2dd5a3576114c8 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Wed, 22 Jul 2026 18:55:55 -0400 Subject: [PATCH 2/6] Skip no-commit-to-branch in CI checks --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index eb98a726..dccf2fe4 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,6 +12,7 @@ env: WORKING_DIR: "my-project" MIN_PYTHON_VERSION: "3.10" CI: true # For insta + SKIP: no-commit-to-branch jobs: clippy: name: Clippy From 9ccd3b91ee027fa8355132330b978afef6ea52d1 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Wed, 22 Jul 2026 19:04:33 -0400 Subject: [PATCH 3/6] Update env var name from SKIP to PREK_SKIP --- .github/workflows/testing.yml | 2 +- src/github_actions.rs | 2 +- ...ithub_actions__tests__save_ci_testing_fastapi_file_pyo3.snap | 2 +- ...ub_actions__tests__save_ci_testing_linux_only_file_pyo3.snap | 2 +- ...ns__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap | 2 +- ...thub_actions__tests__save_ci_testing_multi_os_file_pyo3.snap | 2 +- ..._github_actions__tests__save_setuptools_ci_fastapi_file.snap | 2 +- ...ions__tests__save_setuptools_ci_testing_linux_only_file.snap | 2 +- ...sts__save_setuptools_ci_testing_linux_only_file_pyrefly.snap | 2 +- ...ctions__tests__save_setuptools_ci_testing_multi_os_file.snap | 2 +- ..._github_actions__tests__save_uv_ci_testing_fastapi_file.snap | 2 +- ...thub_actions__tests__save_uv_ci_testing_linux_only_file.snap | 2 +- ...ions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap | 2 +- ...github_actions__tests__save_uv_ci_testing_multi_os_file.snap | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index dccf2fe4..ed76bf5d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,7 @@ env: WORKING_DIR: "my-project" MIN_PYTHON_VERSION: "3.10" CI: true # For insta - SKIP: no-commit-to-branch + PREK_SKIP: no-commit-to-branch jobs: clippy: name: Clippy diff --git a/src/github_actions.rs b/src/github_actions.rs index e9e8915c..5159da52 100644 --- a/src/github_actions.rs +++ b/src/github_actions.rs @@ -16,7 +16,7 @@ fn build_actions_python_test_versions(github_action_python_test_versions: &[Stri } fn create_prek_skip(type_checker: &TypeChecker) -> String { - let mut prek_skip = String::from("\n env:\n SKIP: no-commit-to-branch"); + let mut prek_skip = String::from("\n env:\n PREK_SKIP: no-commit-to-branch"); if let TypeChecker::Pyrefly = type_checker { prek_skip.push_str(",pyrefly-check"); } diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap index 87499c84..524e301a 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap index 3e56179c..f7d76e0f 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap index c214703d..9d06e76d 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap index 8d7c8084..199f1a16 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap index ffea2fe9..a8a5bcf6 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: python -m pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: python -m pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap index b8597a67..659af388 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap index ae72149f..4ea46ccf 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: pyrefly check\n run: pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: pyrefly check\n run: pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap index 427334fe..e63f52bf 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap index 6c602bdc..4993cbaa 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap index f44bc108..f472d95c 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap index c344af2f..b0a57b0b 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap index 5a32696f..01551d81 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v2\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" From 16d6d8534ad90ba32a1bf761b8ca4f901955c7c9 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Wed, 22 Jul 2026 19:15:51 -0400 Subject: [PATCH 4/6] Skip with a flag instead of env var --- .github/workflows/testing.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ed76bf5d..8ec56851 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,7 +12,6 @@ env: WORKING_DIR: "my-project" MIN_PYTHON_VERSION: "3.10" CI: true # For insta - PREK_SKIP: no-commit-to-branch jobs: clippy: name: Clippy @@ -150,7 +149,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - uv run prek run --all-files + uv run prek run --all-files --skip no-commit-to-branch - name: Test with pytest working-directory: ${{ env.WORKING_DIR }} if: matrix.project_type == 'application' @@ -236,7 +235,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - uv run prek run --all-files + uv run prek run --all-files --skip no-commit-to-branch - name: Test with pytest working-directory: ${{ env.WORKING_DIR }} run: uv run pytest @@ -305,7 +304,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - $PREK run --all-files + $prek run --all-files --skip no-commit-to-branch shell: bash env: PREK: ${{ runner.os == 'Windows' && '.venv/Scripts/prek.exe' || '.venv/bin/prek' }} From 7d51d5ae1412cff965875031a5ea60bb706242be Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Wed, 22 Jul 2026 19:22:28 -0400 Subject: [PATCH 5/6] Fix setuptools prek tests --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8ec56851..d9077058 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -304,7 +304,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - $prek run --all-files --skip no-commit-to-branch + $PREK run --all-files --skip no-commit-to-branch shell: bash env: PREK: ${{ runner.os == 'Windows' && '.venv/Scripts/prek.exe' || '.venv/bin/prek' }} From e8c5a4ef16c23c8af5ce46db71bf3984da2b50ca Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Wed, 22 Jul 2026 19:30:41 -0400 Subject: [PATCH 6/6] Update fastapi ci --- .github/workflows/testing_fastapi.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testing_fastapi.yml b/.github/workflows/testing_fastapi.yml index 46e70403..0c9d2886 100644 --- a/.github/workflows/testing_fastapi.yml +++ b/.github/workflows/testing_fastapi.yml @@ -54,7 +54,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - uv run prek run --all-files + uv run prek run --all-files --skip no-commit-to-branch - name: make .env working-directory: ${{ env.WORKING_DIR }} run: touch .env @@ -92,7 +92,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - uv run prek run --all-files + uv run prek run --all-files --skip no-commit-to-branch - name: Test with pytest working-directory: ${{ env.WORKING_DIR }} if: matrix.project_type == 'application' @@ -123,7 +123,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - .venv/bin/prek run --all-files + .venv/bin/prek run --all-files --skip no-commit-to-branch - name: make .env working-directory: ${{ env.WORKING_DIR }} run: touch .env @@ -159,7 +159,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - .venv/bin/prek run --all-files + .venv/bin/prek run --all-files --skip no-commit-to-branch - name: Test with pytest working-directory: ${{ env.WORKING_DIR }} if: matrix.project_type == 'application' @@ -192,7 +192,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - uv run prek run --all-files + uv run prek run --all-files --skip no-commit-to-branch - name: make .env working-directory: ${{ env.WORKING_DIR }} run: touch .env @@ -234,7 +234,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - uv run prek run --all-files + uv run prek run --all-files --skip no-commit-to-branch - name: Test with pytest working-directory: ${{ env.WORKING_DIR }} if: matrix.project_type == 'application' @@ -269,7 +269,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - .venv/bin/prek run --all-files + .venv/bin/prek run --all-files --skip no-commit-to-branch - name: make .env working-directory: ${{ env.WORKING_DIR }} run: touch .env @@ -309,7 +309,7 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: | git add . - .venv/bin/prek run --all-files + .venv/bin/prek run --all-files --skip no-commit-to-branch - name: Test with pytest working-directory: ${{ env.WORKING_DIR }} if: matrix.project_type == 'application'