Skip to content

Add Windows Postgres deps to setup-rust#5

Merged
leynos merged 4 commits intomainfrom
codex/add-windows-postgresql-installation-to-setup-rust-action
Jun 20, 2025
Merged

Add Windows Postgres deps to setup-rust#5
leynos merged 4 commits intomainfrom
codex/add-windows-postgresql-installation-to-setup-rust-action

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Jun 20, 2025

Summary

  • install libpq via Chocolatey on Windows runners
  • document OS-specific behaviour for install-postgres-deps
  • note change in changelog

Testing

  • git status --short

https://chatgpt.com/codex/tasks/task_e_6855621c71d8832281627e34b59301aa

Summary by Sourcery

Enable installing PostgreSQL dependencies on Windows using Chocolatey alongside existing Linux support and document the new behavior

New Features:

  • Support installing PostgreSQL client libraries on Windows runners via Chocolatey

Enhancements:

  • Set PG_INCLUDE and PG_LIB env vars and add PostgreSQL bin to PATH on Windows

Documentation:

  • Document OS-specific behavior for install-postgres-deps in the README
  • Add v1.0.3 changelog entry for Windows Postgres deps

Summary by CodeRabbit

  • New Features
    • PostgreSQL client libraries are now installed on Windows runners using Chocolatey when the relevant option is enabled in the GitHub Action.
  • Documentation
    • Updated README with detailed information about the platform-specific installation of PostgreSQL dependencies.
    • Added a changelog entry for the new PostgreSQL dependency installation behaviour on Windows.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jun 20, 2025

Reviewer's Guide

Enable Windows support in the setup-rust action for installing PostgreSQL client libraries via Chocolatey, adjust conditional logic in action.yml, and update README and CHANGELOG accordingly.

Flow diagram for OS-specific PostgreSQL dependency installation in setup-rust action

flowchart TD
    Start([Start])
    CheckDeps{install-postgres-deps == true?}
    OSCheck{Runner OS}
    LinuxInstall[Install libpq-dev via apt]
    WinInstall[Install postgresql17 via Chocolatey]
    SetEnv[Set PG_INCLUDE, PG_LIB, update PATH]
    End([End])

    Start --> CheckDeps
    CheckDeps -- No --> End
    CheckDeps -- Yes --> OSCheck
    OSCheck -- Linux --> LinuxInstall --> End
    OSCheck -- Windows --> WinInstall --> SetEnv --> End
Loading

File-Level Changes

Change Details Files
Add Windows installation step for PostgreSQL client libraries in action.yml
  • Restrict existing Linux install step to run only on Linux
  • Introduce a new PowerShell step that uses Chocolatey to install postgresql17 client components
  • Set PG_INCLUDE and PG_LIB via GITHUB_ENV and prepend PostgreSQL bin to GITHUB_PATH
.github/actions/setup-rust/action.yml
Document OS-specific behavior for install-postgres-deps in README
  • Explain that Linux uses apt to install libpq-dev
  • Describe how Windows uses Chocolatey to install postgresql17 and expose headers/libs
.github/actions/setup-rust/README.md
Add changelog entry for Windows PostgreSQL dependency support
  • Introduce version v1.0.3 entry
  • Note Windows PostgreSQL client library installation via Chocolatey
.github/actions/setup-rust/CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 20, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update enhances the setup-rust GitHub Action to install PostgreSQL client libraries on Windows runners using Chocolatey when the install-postgres-deps input is enabled. It also documents these changes in the README and changelog, and sets relevant environment variables on Windows.

Changes

File(s) Change Summary
.github/actions/setup-rust/action.yml Added conditional steps for installing PostgreSQL client libraries on Windows using Chocolatey and setting environment variables. Adjusted Linux installation logic to be OS-specific.
.github/actions/setup-rust/README.md Updated documentation to describe platform-specific PostgreSQL dependency installation and environment variable behaviour.
.github/actions/setup-rust/CHANGELOG.md Added changelog entry for version 1.0.3 documenting the new Windows PostgreSQL client installation feature.

Sequence Diagram(s)

sequenceDiagram
    participant Workflow
    participant SetupRustAction
    participant OS_PackageManager

    Workflow->>SetupRustAction: Run with install-postgres-deps=true
    alt On Linux
        SetupRustAction->>OS_PackageManager: Install libpq-dev via apt-get
    else On Windows
        SetupRustAction->>OS_PackageManager: Install postgresql17 via Chocolatey
        SetupRustAction->>SetupRustAction: Set PG_INCLUDE, PG_LIB, update PATH
    end
    SetupRustAction-->>Workflow: PostgreSQL client libraries installed
Loading

Possibly related PRs

Poem

In the warren of code, a new path unfurled,
Now Windows can hop with Postgres installed.
Chocolatey brings the libraries near,
With PG_INCLUDE and PG_LIB set clear.
Rust and Postgres, side by side—
Across OS fields, our builds now glide!
🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch codex/add-windows-postgresql-installation-to-setup-rust-action

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/actions/setup-rust/README.md:25` </location>
<code_context>
     install-postgres-deps: true
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries using the package manager of the underlying runner. On Linux this is
+`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
</code_context>

<issue_to_address>
This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide for Markdown files.
</issue_to_address>

### Comment 2
<location> `.github/actions/setup-rust/README.md:26` </location>
<code_context>
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries using the package manager of the underlying runner. On Linux this is
+`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
+`postgresql17` package and expose its headers and import libraries via
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column limit.

Ensure all lines in paragraphs and bullet points are wrapped to 80 columns or fewer.
</issue_to_address>

### Comment 3
<location> `.github/actions/setup-rust/README.md:27` </location>
<code_context>

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries using the package manager of the underlying runner. On Linux this is
+`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
+`postgresql17` package and expose its headers and import libraries via
+`PG_INCLUDE` and `PG_LIB` environment variables.
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.
</issue_to_address>

### Comment 4
<location> `.github/actions/setup-rust/README.md:28` </location>
<code_context>
+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries using the package manager of the underlying runner. On Linux this is
+`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
+`postgresql17` package and expose its headers and import libraries via
+`PG_INCLUDE` and `PG_LIB` environment variables.
+
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.
</issue_to_address>

### Comment 5
<location> `.github/actions/setup-rust/README.md:29` </location>
<code_context>
+libraries using the package manager of the underlying runner. On Linux this is
+`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
+`postgresql17` package and expose its headers and import libraries via
+`PG_INCLUDE` and `PG_LIB` environment variables.
+
 ## Caching
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/actions/setup-rust/README.md Outdated
install-postgres-deps: true
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide for Markdown files.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries using the package manager of the underlying runner. On Linux this is
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column limit.

Ensure all lines in paragraphs and bullet points are wrapped to 80 columns or fewer.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries using the package manager of the underlying runner. On Linux this is
`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries using the package manager of the underlying runner. On Linux this is
`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
`postgresql17` package and expose its headers and import libraries via
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

libraries using the package manager of the underlying runner. On Linux this is
`apt` (`libpq-dev`), while on Windows Chocolatey is used to install the
`postgresql17` package and expose its headers and import libraries via
`PG_INCLUDE` and `PG_LIB` environment variables.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f0910b and 98b0ada.

📒 Files selected for processing (3)
  • .github/actions/setup-rust/CHANGELOG.md (1 hunks)
  • .github/actions/setup-rust/README.md (1 hunks)
  • .github/actions/setup-rust/action.yml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/actions/setup-rust/README.md

[typographical] ~26-~26: The word ‘When’ starts a question. Add a question mark (“?”) at the end of the sentence.
Context: ...package manager of the underlying runner. On Linux this is apt (libpq-dev), w...

(WRB_QUESTION_MARK)


[typographical] ~26-~26: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: ...ge manager of the underlying runner. On Linux this is apt (libpq-dev), while on W...

(IN_NNP_COMMA)


[uncategorized] ~27-~27: Possible missing comma found.
Context: ...x this is apt (libpq-dev), while on Windows Chocolatey is used to install the `post...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (2)
.github/actions/setup-rust/action.yml (1)

39-43: Environment variables are correctly exposed for subsequent steps

Writing PG_INCLUDE and PG_LIB to $GITHUB_ENV and appending the binary path to $GITHUB_PATH ensures headers, libraries and executables are available to later steps. This follows GitHub Actions conventions.

.github/actions/setup-rust/CHANGELOG.md (1)

4-7: Changelog entry for v1.0.3 is clear

The new entry accurately describes the addition of Windows PostgreSQL client library installation via Chocolatey.

Comment thread .github/actions/setup-rust/action.yml Outdated
Comment thread .github/actions/setup-rust/action.yml Outdated
Comment thread .github/actions/setup-rust/README.md Outdated
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 20, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 20, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98b0ada and 7769c23.

📒 Files selected for processing (2)
  • .github/actions/setup-rust/README.md (1 hunks)
  • .github/actions/setup-rust/action.yml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/actions/setup-rust/README.md

[typographical] ~26-~26: The word ‘When’ starts a question. Add a question mark (“?”) at the end of the sentence.
Context: ...ia the package manager for the runner OS. On Linux, it uses apt (libpq-dev). ...

(WRB_QUESTION_MARK)

🔇 Additional comments (2)
.github/actions/setup-rust/README.md (1)

25-29: Documentation update is clear and adheres to style guidelines

The new paragraph correctly describes OS-specific installation, uses proper punctuation and stays within 80 columns.

.github/actions/setup-rust/action.yml (1)

27-27: Linux install step conditional is correctly expressed

The if uses explicit string comparison and expression syntax to gate the libpq-dev installation on Linux.

Comment thread .github/actions/setup-rust/action.yml
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 20, 2025

@sourcery-ai review

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Jun 20, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 20, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/actions/setup-rust/README.md:25` </location>
<code_context>
     install-postgres-deps: true
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
</code_context>

<issue_to_address>
This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide for Markdown files.
</issue_to_address>

### Comment 2
<location> `.github/actions/setup-rust/README.md:26` </location>
<code_context>
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
</code_context>

<issue_to_address>
This line is part of a paragraph that is not wrapped to 80 columns.

Ensure that all lines in paragraphs and bullet points are wrapped to 80 columns for readability and consistency.
</issue_to_address>

### Comment 3
<location> `.github/actions/setup-rust/README.md:27` </location>
<code_context>

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
</code_context>

<issue_to_address>
This line is part of a paragraph that is not wrapped to 80 columns.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.
</issue_to_address>

### Comment 4
<location> `.github/actions/setup-rust/README.md:28` </location>
<code_context>
+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
+
</code_context>

<issue_to_address>
This line is part of a paragraph that is not wrapped to 80 columns.

All lines in paragraphs should be wrapped to 80 columns. Please update this section accordingly.
</issue_to_address>

### Comment 5
<location> `.github/actions/setup-rust/README.md:29` </location>
<code_context>
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
+
 ## Caching
</code_context>

<issue_to_address>
This line is part of a paragraph that is not wrapped to 80 columns.

Please ensure the entire paragraph is wrapped to 80 columns, including this line.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/actions/setup-rust/README.md Outdated
install-postgres-deps: true
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide for Markdown files.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that is not wrapped to 80 columns.

Ensure that all lines in paragraphs and bullet points are wrapped to 80 columns for readability and consistency.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that is not wrapped to 80 columns.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
and exposes its headers and import libraries via `PG_INCLUDE` and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that is not wrapped to 80 columns.

All lines in paragraphs should be wrapped to 80 columns. Please update this section accordingly.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
and exposes its headers and import libraries via `PG_INCLUDE` and
`PG_LIB` environment variables.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that is not wrapped to 80 columns.

Please ensure the entire paragraph is wrapped to 80 columns, including this line.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/actions/setup-rust/README.md:25` </location>
<code_context>
     install-postgres-deps: true
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
</code_context>

<issue_to_address>
This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide for Markdown files.
</issue_to_address>

### Comment 2
<location> `.github/actions/setup-rust/README.md:27` </location>
<code_context>

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column limit.

Please ensure all lines in paragraphs and bullet points are wrapped to 80 columns or fewer.
</issue_to_address>

### Comment 3
<location> `.github/actions/setup-rust/README.md:28` </location>
<code_context>
+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
+
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.
</issue_to_address>

### Comment 4
<location> `.github/actions/setup-rust/README.md:29` </location>
<code_context>
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
+
 ## Caching
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/actions/setup-rust/README.md Outdated
install-postgres-deps: true
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide for Markdown files.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column limit.

Please ensure all lines in paragraphs and bullet points are wrapped to 80 columns or fewer.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
and exposes its headers and import libraries via `PG_INCLUDE` and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
and exposes its headers and import libraries via `PG_INCLUDE` and
`PG_LIB` environment variables.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column limit.

Please wrap this paragraph to 80 columns as required by the Markdown formatting guidelines.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/actions/setup-rust/README.md:25` </location>
<code_context>
     install-postgres-deps: true
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
</code_context>

<issue_to_address>
This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide.
</issue_to_address>

### Comment 2
<location> `.github/actions/setup-rust/README.md:26` </location>
<code_context>
 ```

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column limit.

Ensure all lines in paragraphs and bullet points are wrapped to 80 columns or fewer.
</issue_to_address>

### Comment 3
<location> `.github/actions/setup-rust/README.md:27` </location>
<code_context>

+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the instructions.
</issue_to_address>

### Comment 4
<location> `.github/actions/setup-rust/README.md:28` </location>
<code_context>
+When `install-postgres-deps` is enabled, the action installs PostgreSQL client
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
+
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please ensure all lines in this paragraph are wrapped to 80 columns or fewer.
</issue_to_address>

### Comment 5
<location> `.github/actions/setup-rust/README.md:29` </location>
<code_context>
+libraries via the package manager for the runner OS. On Linux, it uses
+`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
+and exposes its headers and import libraries via `PG_INCLUDE` and
+`PG_LIB` environment variables.
+
 ## Caching
</code_context>

<issue_to_address>
This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as per the review instructions.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/actions/setup-rust/README.md Outdated
install-postgres-deps: true
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This paragraph exceeds the 80 column wrapping limit for Markdown text.

Please wrap this paragraph so that no line exceeds 80 columns, as per the style guide.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
```

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column limit.

Ensure all lines in paragraphs and bullet points are wrapped to 80 columns or fewer.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated

When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as required by the instructions.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
When `install-postgres-deps` is enabled, the action installs PostgreSQL client
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
and exposes its headers and import libraries via `PG_INCLUDE` and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please ensure all lines in this paragraph are wrapped to 80 columns or fewer.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Comment thread .github/actions/setup-rust/README.md Outdated
libraries via the package manager for the runner OS. On Linux, it uses
`apt` (`libpq-dev`). On Windows, Chocolatey installs `postgresql17`
and exposes its headers and import libraries via `PG_INCLUDE` and
`PG_LIB` environment variables.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (review_instructions): This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please wrap this paragraph to 80 columns as per the review instructions.

Review instructions:

Path patterns: **/*.md

Instructions:
Paragraphs and bullets must be wrapped to 80 columns

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7769c23 and c2a63ae.

📒 Files selected for processing (1)
  • .github/actions/setup-rust/action.yml (1 hunks)
🔇 Additional comments (3)
.github/actions/setup-rust/action.yml (3)

27-27: Approve Linux installation condition.

The if expression now correctly uses explicit string comparison and the composite expression syntax:
${{ inputs.install-postgres-deps == 'true' && runner.os == 'Linux' }}.


30-33: Approve Windows step header.

The Windows-specific step correctly gates on
${{ inputs.install-postgres-deps == 'true' && runner.os == 'Windows' }}
and uses shell: pwsh to target PowerShell Core.


34-35: Approve Chocolatey install command.

The single-line choco install postgresql17 --no-progress -y --params '/Password:postgres /NoService /SkipStackBuilder'
avoids invalid backslashes for continuation and suppresses the server bits as intended.

Comment on lines +37 to +41
# Tell the rest of the job where the headers and import library are
$pgRoot = "${Env:ProgramFiles}\PostgreSQL\17"
echo "PG_INCLUDE=$pgRoot\include" >> $Env:GITHUB_ENV
echo "PG_LIB=$pgRoot\lib" >> $Env:GITHUB_ENV
echo "$pgRoot\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consistent environment file writes.

To avoid potential encoding mismatches or BOM artifacts, unify the approach by using Out-File with -Encoding utf8 -Append for all GITHUB_ENV entries. For example:

- echo "PG_INCLUDE=$pgRoot\include"  >> $Env:GITHUB_ENV
- echo "PG_LIB=$pgRoot\lib"          >> $Env:GITHUB_ENV
+ "PG_INCLUDE=$pgRoot\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
+ "PG_LIB=$pgRoot\lib"          | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Tell the rest of the job where the headers and import library are
$pgRoot = "${Env:ProgramFiles}\PostgreSQL\17"
echo "PG_INCLUDE=$pgRoot\include" >> $Env:GITHUB_ENV
echo "PG_LIB=$pgRoot\lib" >> $Env:GITHUB_ENV
echo "$pgRoot\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
# Tell the rest of the job where the headers and import library are
$pgRoot = "${Env:ProgramFiles}\PostgreSQL\17"
- echo "PG_INCLUDE=$pgRoot\include" >> $Env:GITHUB_ENV
- echo "PG_LIB=$pgRoot\lib" >> $Env:GITHUB_ENV
+ "PG_INCLUDE=$pgRoot\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
+ "PG_LIB=$pgRoot\lib" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "$pgRoot\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
🤖 Prompt for AI Agents
In .github/actions/setup-rust/action.yml around lines 37 to 41, the script
writes environment variables to GITHUB_ENV using echo redirection, which can
cause encoding inconsistencies. Replace all echo redirections to GITHUB_ENV with
Out-File commands using the -Encoding utf8 -Append flags to ensure consistent
UTF-8 encoding without BOM artifacts for all environment file writes.

@leynos leynos merged commit af7f2ff into main Jun 20, 2025
1 check passed
@leynos leynos deleted the codex/add-windows-postgresql-installation-to-setup-rust-action branch June 20, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant