Skip to content

github-workflow: Add new e2e test#117

Merged
ganto merged 2 commits intomainfrom
feature/e2e-github-workflow
Mar 22, 2026
Merged

github-workflow: Add new e2e test#117
ganto merged 2 commits intomainfrom
feature/e2e-github-workflow

Conversation

@ganto
Copy link
Copy Markdown
Owner

@ganto ganto commented Mar 22, 2026

No description provided.

@ganto ganto added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Mar 22, 2026
@ganto ganto requested a review from Copilot March 22, 2026 00:00
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

Adds an expanded, multi-distro e2e testing setup (including an on-demand GitHub Actions workflow) and updates pkgproxy configuration/docs to support Ubuntu security repos consistently across config, landing page snippets, and README.

Changes:

  • Restructure test/e2e/e2e_test.go into per-distro top-level tests, add TestMain to build pkgproxy once, and add helpers for repo/sources generation.
  • Add new e2e coverage for CentOS Stream, AlmaLinux, Rocky Linux, and Ubuntu; improve e2e shell scripts with config dump output for debugging.
  • Add ubuntu-security repository support and update landing page snippets, README/CLAUDE docs, Makefile e2e target, changelog, and a new workflow_dispatch GitHub Actions e2e workflow.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/e2e/test-pacman.sh Print configured mirrorlist for easier debugging in Arch runs.
test/e2e/test-dnf.sh Print mounted DNF repo files to aid debugging across RPM distros.
test/e2e/test-apt.sh Stop generating sources.list in-shell; print mounted sources.list for debugging.
test/e2e/e2e_test.go Major refactor: TestMain build-once, per-distro tests, new distros, helper extraction.
pkg/pkgproxy/landing_test.go Update/extend snippet expectations for Ubuntu + new ubuntu-security.
pkg/pkgproxy/landing.go Split Ubuntu security snippet into a distinct ubuntu-security repo snippet.
configs/pkgproxy.yaml Add ubuntu-security repository configuration.
README.md Update Ubuntu apt example to use /ubuntu-security; add e2e testing docs and make targets.
Makefile Add DISTRO/RELEASE filtering for make e2e with a 15m timeout.
CLAUDE.md Document make e2e usage; add rules requiring e2e coverage/consistency.
CHANGELOG.md Note the new default ubuntu-security repository.
.github/workflows/e2e.yaml Add manually-triggered matrix e2e workflow.
openspec/changes/e2e-github-workflow/tasks.md Task checklist for the change set.
openspec/changes/e2e-github-workflow/specs/e2e-testing/spec.md Spec for refactored e2e framework + TestMain build-once approach.
openspec/changes/e2e-github-workflow/specs/e2e-multi-distro/spec.md Spec for new multi-distro coverage and repo patterns.
openspec/changes/e2e-github-workflow/specs/e2e-github-workflow/spec.md Spec for the new GitHub Actions workflow behavior/matrix.
openspec/changes/e2e-github-workflow/proposal.md High-level proposal and impact summary.
openspec/changes/e2e-github-workflow/design.md Design rationale and trade-offs for workflow + e2e restructuring.
openspec/changes/e2e-github-workflow/.openspec.yaml OpenSpec metadata for this change set.
Comments suppressed due to low confidence (1)

test/e2e/e2e_test.go:147

  • For Docker on Linux, host.docker.internal typically does not resolve inside containers unless an explicit host mapping is added (e.g. --add-host=host.docker.internal:host-gateway). Since proxyAddr is built from hostGateway and the GitHub Actions workflow forces CONTAINER_RUNTIME=docker, containers may be unable to reach the host-side pkgproxy. Consider adding a Docker-specific flag in runContainer to ensure host.docker.internal is resolvable (or otherwise pass the host gateway IP/hostname in a way that works on Linux runners).
func runContainer(t *testing.T, image string, mounts []string, cmdArgs []string) {
	t.Helper()
	args := []string{"run", "--rm"}
	for _, m := range mounts {
		args = append(args, "-v", m)
	}
	args = append(args, image)
	args = append(args, cmdArgs...)

	t.Logf("running: %s %v", containerRuntime, args)
	cmd := exec.Command(containerRuntime, args...)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	err := cmd.Run()
	require.NoError(t, err, "container command failed")

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

…y repo

- Add GitHub Actions workflow (.github/workflows/e2e.yaml) with
  workflow_dispatch trigger and matrix strategy for 7 distro/release tuples
- Restructure e2e tests from single TestE2E into per-distro top-level
  functions (TestFedora, TestDebian, TestArch) with TestMain building
  the binary once
- Add e2e tests for CentOS Stream, AlmaLinux, Rocky Linux, and Ubuntu
  with EPEL and COPR coverage for DNF-based distros
- Add ubuntu-security repository to pkgproxy config and update landing
  page snippet and README to use /ubuntu-security for security updates
- Move sources.list generation from test-apt.sh into Go test, add repo
  config printing to all shell scripts
- Update Makefile e2e target with DISTRO/RELEASE params and 15m timeout
- Update CLAUDE.md and README.md with e2e testing documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ganto ganto force-pushed the feature/e2e-github-workflow branch from e34c602 to 4f96ce6 Compare March 22, 2026 00:17
@ganto ganto marked this pull request as ready for review March 22, 2026 00:20
@ganto
Copy link
Copy Markdown
Owner Author

ganto commented Mar 22, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@ganto ganto merged commit 20d47ce into main Mar 22, 2026
7 checks passed
@ganto ganto deleted the feature/e2e-github-workflow branch March 22, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants