Skip to content

Update Pre-Commit Script for GitHub Runner-Compatible E2E Tests #146

Closed

Description

@josecelano

Overview

Update the pre-commit verification script (scripts/pre-commit.sh) to run GitHub runner-compatible E2E tests instead of the full E2E test suite. This enables GitHub Copilot agents to successfully execute pre-commit checks in GitHub Actions environments where LXD VM network connectivity is limited.

Specification

See detailed specification: docs/issues/update-precommit-script-for-github-runner-compatible-e2e-tests.md

Problem Statement

The pre-commit script currently runs e2e-tests-full which:

  • Requires LXD VMs with full network connectivity
  • Cannot run on GitHub Actions runners due to known networking limitations with nested virtualization
  • Prevents GitHub Copilot agents from executing pre-commit checks

Solution

Replace the single e2e-tests-full step with two GitHub runner-compatible tests:

  1. e2e-provision-and-destroy-tests - Infrastructure lifecycle testing
  2. e2e-config-tests - Software installation and configuration testing

Implementation Plan

Phase 1: Update Pre-Commit Script (30 minutes)

  • Task 1.1: Replace the E2E full test step with provision and destroy test step
  • Task 1.2: Add the configuration test step after provision and destroy test step
  • Task 1.3: Verify step numbering and total step count are correct
  • Task 1.4: Test the script locally to ensure both tests run successfully

Phase 2: Documentation Updates (15 minutes)

  • Task 2.1: Update docs/contributing/commit-process.md to document the split E2E test execution
  • Task 2.2: Update .github/copilot-instructions.md if needed
  • Task 2.3: Ensure documentation clarifies when to use E2E full tests vs split tests

Phase 3: Validation (15 minutes)

  • Task 3.1: Run ./scripts/pre-commit.sh locally to verify both E2E tests execute
  • Task 3.2: Verify pre-commit script passes when both E2E tests succeed
  • Task 3.3: Verify pre-commit script fails when either E2E test fails
  • Task 3.4: Run shellcheck on the modified script

Acceptance Criteria

Quality Checks:

  • Pre-commit checks pass: ./scripts/pre-commit.sh
  • Shellcheck passes for scripts/pre-commit.sh

Task-Specific Criteria:

  • Pre-commit script runs provision and destroy E2E tests
  • Pre-commit script runs configuration E2E tests
  • Both E2E test steps execute in sequence
  • Script succeeds when both tests pass
  • Script fails appropriately when either test fails
  • Step numbering and count are correct
  • Timing notes accurately describe each test's duration expectations
  • Documentation reflects the split E2E test approach

Testing Criteria:

  • Verify locally: ./scripts/pre-commit.sh completes successfully
  • Verify provision test step runs: Check for "Running E2E provision and destroy tests" message
  • Verify config test step runs: Check for "Running E2E configuration tests" message
  • Both test steps show success messages with timing

Related

Time Estimate

Total: 1-1.5 hours

  • Script modification: 30 minutes
  • Documentation updates: 15 minutes
  • Testing and validation: 15 minutes
  • Buffer for edge cases: 15 minutes

Activity

  1. josecelano commented on Nov 5, 2025

    @josecelano
    MemberAuthor
  2. added 2 commits that reference this issue on Nov 5, 2025
  3. added 2 commits that reference this issue on Nov 5, 2025
  4. added a commit that references this issue on Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions