Skip to content

Add GitHub Actions checks, test script, and skip-main flag to uki-setup - #4

Merged
GlitchSlayed merged 1 commit into
mainfrom
codex/add-checks-with-fedora-container-in-gh-vjbaw2
Mar 7, 2026
Merged

GlitchSlayed merged 1 commit into
mainfrom
codex/add-checks-with-fedora-container-in-gh-vjbaw2

Conversation

@GlitchSlayed

Copy link
Copy Markdown
Owner

Motivation

  • Add automated CI to lint and validate uki-setup.sh and its generated artifacts in a Fedora container on push and PRs.
  • Allow test harnesses to source the script without running the main workflow by providing a skip-main switch.
  • Make the post-install summary robust against missing glob matches when listing UKI files.

Description

  • Add .github/workflows/checks.yml which runs a Fedora container, installs shell tooling, and executes bash -n, shellcheck, and the project check script.
  • Add tests/test_uki_setup.sh which sets UKI_SETUP_SKIP_MAIN=1, sources uki-setup.sh, invokes phase_write_build_script and phase_write_plugin, and validates template substitution and generated file contents.
  • Document the CI checks and local reproduction commands in README.md.
  • Modify uki-setup.sh to replace ls -lh "${EFI_DIR}"*.efi with find "${EFI_DIR}" -maxdepth 1 -type f -name "*.efi" -exec ls -lh {} + to avoid shell glob issues.
  • Guard the script main execution with if [[ "${UKI_SETUP_SKIP_MAIN:-0}" -ne 1 ]]; then ... fi so tests can source the file safely.

Testing

  • Run bash -n uki-setup.sh tests/test_uki_setup.sh to verify Bash syntax, which succeeded.
  • Run shellcheck -P . uki-setup.sh tests/test_uki_setup.sh to lint the scripts, which succeeded.
  • Run the project check bash tests/test_uki_setup.sh to validate generated artifacts and template substitution, which succeeded.

Codex Task

@GlitchSlayed
GlitchSlayed merged commit 60097a4 into main Mar 7, 2026
0 of 2 checks passed

@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.

Reviewed commit: 5311302fcf

ℹ️ 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 "@codex address that feedback".

Comment thread uki-setup.sh
phase_disable_bls_plugins
phase_initial_build
phase_summary
if [[ "${UKI_SETUP_SKIP_MAIN:-0}" -ne 1 ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle skip-main flag without arithmetic evaluation

The new UKI_SETUP_SKIP_MAIN guard uses -ne, which triggers arithmetic evaluation under set -u; if a caller sets UKI_SETUP_SKIP_MAIN to a common string boolean like true/false, Bash treats that token as a variable name and exits with an unbound-variable error before any phase runs. This makes the script unexpectedly fail in automation environments that pass string-valued env flags instead of numeric 0/1.

Useful? React with 👍 / 👎.

@GlitchSlayed
GlitchSlayed deleted the codex/add-checks-with-fedora-container-in-gh-vjbaw2 branch March 19, 2026 02:14
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