Skip to content

Conversation

@mapitman
Copy link
Owner

  • Add Docker-based testing with clean Ubuntu environments
  • Add Makefile with convenient test targets (test, test-interactive, test-all, etc.)
  • Add test runner scripts for automated and manual testing
  • Add GitHub Actions workflow for CI/CD testing on multiple Ubuntu versions
  • Add comprehensive testing documentation
  • Add QEMU testing setup for full system testing
  • Support testing Ubuntu 20.04, 22.04, and 24.04

Testing can now be run safely on clean Ubuntu installs without affecting the dev system.

- Add Docker-based testing with clean Ubuntu environments
- Add Makefile with convenient test targets (test, test-interactive, test-all, etc.)
- Add test runner scripts for automated and manual testing
- Add GitHub Actions workflow for CI/CD testing on multiple Ubuntu versions
- Add comprehensive testing documentation
- Add QEMU testing setup for full system testing
- Support testing Ubuntu 20.04, 22.04, and 24.04

Testing can now be run safely on clean Ubuntu installs without affecting the dev system.
Copilot AI review requested due to automatic review settings December 20, 2025 21:14
Copy link

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 adds comprehensive automated testing infrastructure for Ubuntu bootstrap scripts to enable safe testing without affecting development systems. The testing approach uses Docker for fast package installation validation and provides QEMU documentation for full system testing.

Key changes:

  • Docker-based test environments with interactive and automated modes for Ubuntu 20.04, 22.04, and 24.04
  • Makefile with convenient test targets and GitHub Actions workflow for CI/CD
  • Comprehensive testing documentation covering Docker, QEMU, and various testing strategies

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
test/run-tests.sh Main test runner script supporting interactive, automated, and syntax-check modes across multiple Ubuntu versions
test/monitor-test.sh Test monitoring script that logs output for debugging
test/docker/Dockerfile.ubuntu Interactive Docker environment for manual testing of bootstrap scripts
test/docker/Dockerfile.ubuntu-noninteractive Automated Docker environment that runs bootstrap tests non-interactively
test/docker/.dockerignore Excludes test artifacts and documentation from Docker images
test/README.md Comprehensive testing documentation with Docker/QEMU comparison and workflow recommendations
test/qemu/README.md QEMU setup guide for full system-level testing with cloud-init automation
Makefile Convenient test targets (test, test-all, lint, clean) for local development
.github/workflows/test-ubuntu.yml CI/CD workflow testing bootstrap scripts on multiple Ubuntu versions

echo -e "\n${GREEN}✓ All syntax checks passed${NC}\n"

if command -v shellcheck &> /dev/null; then
print_header "Running ShellCheck"
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

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

The shellcheck command at line 123 uses || print_warning which means it will always succeed even if shellcheck finds issues. This inconsistency with the earlier syntax checks (which properly fail on errors due to set -e) may be intentional but should be documented. Consider either making shellcheck failures hard errors or adding a comment explaining why shellcheck warnings don't fail the build.

Suggested change
print_header "Running ShellCheck"
print_header "Running ShellCheck"
# ShellCheck is treated as advisory linting: keep syntax errors as hard failures
# via 'set -e' above, but do not fail the overall test run on style warnings here.

Copilot uses AI. Check for mistakes.
- Add error handling (|| exit) to all pushd/popd/cd commands
- Quote all $HOME and $USER variables to prevent word splitting
- Fixes SC2164 warnings in ubuntu/install-makemkv
- Fixes SC2164 warning in generic/auto-cpufreq
- Fixes SC2086 warnings in generic/create-directories, install-zsh-customizations, and add-user-to-groups

Remaining SC1090/SC1091 warnings are expected (documented in .shellcheckrc)
Fix GitHub Actions workflow to skip .md files when running shellcheck
Copy link

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

Copilot reviewed 14 out of 37 changed files in this pull request and generated 1 comment.

- ci.yml: Exclude .md files when finding bash scripts
- test-ubuntu.yml: Exclude .md files in both shellcheck and syntax verification
@mapitman mapitman marked this pull request as draft December 20, 2025 21:34
Drop testing of older versions (20.04, 22.04) and focus on current LTS (24.04) and latest (25.10)
Copy link

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

Copilot reviewed 15 out of 38 changed files in this pull request and generated 1 comment.

- Update test runner usage/help and default Ubuntu versions to 24.04/25.10
- Document ShellCheck advisory behavior and PIPESTATUS bashism
- Convert noninteractive Dockerfile runner to heredoc for readability
- Make CI ShellCheck fail on errors; drop redundant smoke test job
- Makefile: align versions and enforce shellcheck with severity=error
- Download pinned v2.2.2 archive with SHA256 verification
- Remove git clone of HEAD to reduce supply-chain risk
- Install from verified, versioned source
Copy link

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

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

@mapitman mapitman marked this pull request as ready for review December 20, 2025 22:32
@mapitman mapitman merged commit 3a56615 into main Dec 20, 2025
5 checks passed
@mapitman mapitman deleted the automated-testing branch December 20, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants