Skip to content

ci: consolidate nix setup and drop nix develop --command wrappers#795

Merged
jonstacks merged 1 commit intomainfrom
stacks/nix-setup-action
Mar 30, 2026
Merged

ci: consolidate nix setup and drop nix develop --command wrappers#795
jonstacks merged 1 commit intomainfrom
stacks/nix-setup-action

Conversation

@jonstacks
Copy link
Copy Markdown
Collaborator

What

While working on our setup up Copilot Agent, I found that we can use direnv export gha to put all of our nix provided tools on the path. I also noticed that we were installing nix and the cache action in many places. This makes it harder to update the versions of these actions across all of our workflows.

How

  • Consolidate install nix, setup up the cache, and downloading and using direnv to a single place and use it in our other workflows.
  • Since we are now using direnv export gha, we no longer need to use nix develop --command across our actions

Breaking Changes

No, this should only impact CI

Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
@jonstacks jonstacks self-assigned this Mar 27, 2026
@jonstacks jonstacks requested a review from a team as a code owner March 27, 2026 21:48
@github-actions github-actions bot added the area/ci Issues/PRs relating to CI label Mar 27, 2026
@jonstacks jonstacks requested a review from Copilot March 27, 2026 21:49
@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines label Mar 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates Nix + cache + direnv setup into a reusable composite GitHub Action and updates CI workflows to rely on direnv export gha so steps can run make … directly without nix develop --command … wrappers.

Changes:

  • Add a new composite action (.github/actions/nix-setup) to install Nix, configure the magic cache, and export the flake devShell environment into subsequent steps.
  • Update multiple workflows to use the new nix-setup action and replace nix develop --command make … with make ….
  • Update the build-and-test composite action to run make directly (assuming the environment is already prepared by nix-setup).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/helm_release.yaml Use centralized nix-setup; run Helm setup via make directly.
.github/workflows/generate-full-install-manifests.yaml Use centralized nix-setup; drop nix develop wrapper (but workflow trigger/checkout config needs correction).
.github/workflows/copilot-setup-steps.yml Replace inline Nix/cache/direnv steps with centralized nix-setup.
.github/workflows/ci.yaml Use centralized nix-setup across jobs; run make/go commands directly.
.github/actions/nix-setup/action.yaml New composite action implementing the consolidated Nix + cache + direnv setup (currently has a YAML structure issue).
.github/actions/build-and-test/action.yaml Remove nix develop --command wrappers and run make targets directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.52%. Comparing base (7b8fb26) to head (03a5632).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #795   +/-   ##
=======================================
  Coverage   51.52%   51.52%           
=======================================
  Files         101      101           
  Lines       11188    11188           
=======================================
  Hits         5765     5765           
- Misses       5002     5004    +2     
+ Partials      421      419    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonstacks jonstacks added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 5f44c0a Mar 30, 2026
32 of 33 checks passed
@jonstacks jonstacks deleted the stacks/nix-setup-action branch March 30, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Issues/PRs relating to CI size/L Denotes a PR that changes 100-499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants