Skip to content

Gate release build on tests and pin Nixpkgs - #20

Open
andersaamodt wants to merge 1 commit into
mainfrom
codex/restore-nixos-standalone-binary-n16t1c
Open

andersaamodt wants to merge 1 commit into
mainfrom
codex/restore-nixos-standalone-binary-n16t1c

Conversation

@andersaamodt

Copy link
Copy Markdown
Owner

Summary

  • gate the release build workflow so it runs after the Test and coverage workflow succeeds and checks out the tested commit before building both artifacts
  • pin the standalone Nix derivation to the nixos-23.11 channel tarball and cleanly copy the resulting binary from a dedicated out-link

Testing

  • cargo test

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 16 to +20
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_sha }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Build workflow checks out untested SHA

The release workflow is triggered only after the test workflow succeeds, but the checkout step pulls github.event.workflow_run.head_sha, which is the head commit of the PR branch. The tests in Test and coverage run against the merge commit (refs/pull/<n>/merge), not the head SHA, so the binary built here can differ from the code that actually passed tests and might even fail to merge. To build the same code that was verified by CI, the workflow should checkout the merge ref (e.g. refs/pull/${{ github.event.workflow_run.pull_requests[0].number }}/merge) or the exact SHA that the test workflow built.

Useful? React with 👍 / 👎.

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