Skip to content

ci(e2e): implement comprehensive cross-platform E2E testing infrastructure#40

Draft
wherka-ama wants to merge 1 commit into
AmadeusITGroup:mainfrom
wherka-ama:feature/cross-platform-e2e-testing
Draft

ci(e2e): implement comprehensive cross-platform E2E testing infrastructure#40
wherka-ama wants to merge 1 commit into
AmadeusITGroup:mainfrom
wherka-ama:feature/cross-platform-e2e-testing

Conversation

@wherka-ama
Copy link
Copy Markdown
Member

Description

Implements comprehensive cross-platform end-to-end (E2E) testing infrastructure to validate all released artifacts before promotion to latest. This PR addresses the need for automated testing across multiple OS/architecture combinations to ensure release quality.

Key Objectives:

  1. Prerelease gate pattern: Upload as prerelease → run E2E → promote to latest on success
  2. Package-specific test jobs: Separate jobs for .deb, .rpm, and archive formats
  3. Standalone validation: Test that /usr/bin/gh-app-auth works without gh CLI
  4. Cross-platform coverage: AMD64 and ARM64 for Linux, macOS, and Windows

Closes #39

Type of Change

Please delete options that are not relevant:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes, no api changes)
  • ⚡ Performance improvements
  • 🧪 Test updates
  • 🔒 Security improvements

Changes Made

E2E Workflow (.github/workflows/e2e.yml)

  • Added 10 platform-specific E2E jobs covering all release artifacts
  • Linux AMD64/ARM64 binary tests
  • Fedora AMD64/ARM64 RPM package tests (container-based)
  • Ubuntu AMD64/ARM64 DEB package tests (container-based)
  • macOS AMD64 (macos-15-intel) and ARM64 (macos-latest) binary tests
  • Windows AMD64 (windows-latest) and ARM64 (windows-11-arm) binary tests
  • Promote-release job that gates latest release on all E2E jobs passing

Code Fixes

  • cmd/setup.go: Skip Unix permission checks on Windows (Windows uses ACLs, not Unix mode bits)
  • cmd/gitconfig.go: Convert backslashes to forward slashes in Windows credential helper batch wrapper paths (prevents shell interpretation issues)

Build & Packaging

  • nfpm.yaml: New nfpm configuration for building .deb and .rpm packages
  • Makefile: Added packaging targets (package, package-deb, package-rpm)
  • .gitignore: Added packaging artifact patterns
  • .github/workflows/release.yml: Updated to trigger E2E workflow after prerelease upload

E2E Test Infrastructure

  • test/e2e/helpers_test.go: Added Windows temp dir helper for credential wrapper tests
  • test/e2e/suite_test.go: Updated test configuration for multi-platform support
  • test/e2e/auth_test.go: Enhanced authentication tests with proper binary path handling
  • test/e2e/gitops_test.go: Streamlined Git operations tests
  • test/e2e/install_test.go: Fixed install path verification for packaged binaries

Testing

Please describe the tests that you ran to verify your changes:

  • Unit tests pass: go test ./...
  • Build succeeds: go build -o gh-app-auth .
  • Manual testing performed
  • Integration tests with real GitHub Apps (via E2E workflow)

Test Configuration

  • OS: Multiple (Ubuntu, Fedora, macOS, Windows)
  • Go version: 1.21+
  • GitHub CLI version: Latest

E2E Test Results:
All 10 platform jobs must pass before release promotion:

  • ✅ Linux AMD64/ARM64 binaries
  • ✅ Fedora AMD64/ARM64 RPM packages
  • ✅ Ubuntu AMD64/ARM64 DEB packages
  • ✅ macOS AMD64/ARM64 binaries
  • ✅ Windows AMD64/ARM64 binaries

Security Considerations

If this PR involves security-related changes:

  • No sensitive data (tokens, keys) exposed in code or tests
  • Input validation added/reviewed for new functionality
  • Private key handling follows security best practices
  • Token caching security maintained
  • No new attack vectors introduced

Notes:

  • E2E tests use GitHub secrets (E2E_APP_ID, E2E_PRIVATE_KEY_B64, E2E_GITHUB_TOKEN)
  • Private key file permissions properly validated on Unix (skipped on Windows)
  • No secrets logged in plain text (uses secrets.HashToken() for debug output)

Documentation

  • Code comments updated
  • README.md updated (if needed)
  • Architecture documentation updated (if needed)
  • Command help text updated (if needed)

Notes:

  • E2E infrastructure documented in workflow file comments
  • Test helper functions have inline documentation

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published
  • Commit messages follow Conventional Commits format
  • PR title follows conventional commits format (e.g., ci(e2e): implement comprehensive cross-platform E2E testing)

Breaking Changes

If this is a breaking change, please describe the impact and migration path for existing users:

None - This PR only adds CI/CD infrastructure and does not change any user-facing functionality.

Additional Notes

Known Limitations

  • Windows ARM64 runner (windows-11-arm) is in public preview
  • macOS Intel runners (macos-15-intel) are deprecated as of Dec 2025, migration to ARM64 recommended for future

Future Work

  • Consider adding FreeBSD or other Unix-like systems if needed
  • Add performance benchmarking to E2E pipeline
  • Implement E2E test result reporting to PR comments or the job summary

@wherka-ama wherka-ama self-assigned this Feb 22, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in gh-app-auth Feb 22, 2026
@wherka-ama wherka-ama moved this from Backlog to In progress in gh-app-auth Feb 22, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 27.27273% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.66%. Comparing base (8f640ac) to head (70bb99e).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
cmd/gitconfig.go 11.11% 14 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   54.29%   54.66%   +0.36%     
==========================================
  Files          27       27              
  Lines        3514     3635     +121     
==========================================
+ Hits         1908     1987      +79     
- Misses       1447     1485      +38     
- Partials      159      163       +4     
Flag Coverage Δ
unittests 54.66% <27.27%> (+0.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@wherka-ama wherka-ama force-pushed the feature/cross-platform-e2e-testing branch 7 times, most recently from 997b2f4 to e3a0911 Compare February 23, 2026 12:19
…cture

Adds end-to-end testing for all released artifacts across multiple platforms:

Platform Coverage:
- Linux AMD64/ARM64 binaries
- Fedora AMD64/ARM64 RPM packages
- Ubuntu AMD64/ARM64 DEB packages
- macOS AMD64 (macos-15-intel) and ARM64 (macos-latest) binaries
- Windows AMD64 (windows-latest) and ARM64 (windows-11-arm) binaries

Key Fixes:
- Skip Unix permission checks on Windows (ACL-based permissions)
- Fix credential helper path formatting for Windows batch wrapper
- Update RPM/DEB download patterns with wildcards for release numbers

Infrastructure:
- E2E workflow with prerelease gate pattern
- Package-specific test jobs with container isolation
- nfpm.yaml for .deb/.rpm packaging
- Updated Makefile with packaging targets

Closes AmadeusITGroup#39
@wherka-ama wherka-ama force-pushed the feature/cross-platform-e2e-testing branch from e3a0911 to 70bb99e Compare March 14, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

[Feature] implement cross-platform E2E testing for release artifacts with standalone package validation

1 participant