Skip to content

Commit 05ee4b0

Browse files
Copilotjosecelano
andcommitted
docs: [#146] update documentation for split E2E test execution
Co-authored-by: josecelano <[email protected]>
1 parent af2846e commit 05ee4b0

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ These principles should guide all development decisions, code reviews, and featu
119119
- **Unit Tests**: When writing unit tests, follow conventions described in [`docs/contributing/testing/`](../docs/contributing/testing/)
120120
- **E2E Tests**:
121121
- `cargo run --bin e2e-tests-full` - Comprehensive tests (⚠️ **LOCAL ONLY** - cannot run on GitHub Actions due to network connectivity issues)
122-
- `cargo run --bin e2e-provision-tests` - Infrastructure provisioning tests
123-
- `cargo run --bin e2e-config-tests` - Configuration validation tests
122+
- `cargo run --bin e2e-provision-and-destroy-tests` - Infrastructure provisioning and destruction tests (GitHub runner-compatible)
123+
- `cargo run --bin e2e-config-tests` - Software installation and configuration tests (GitHub runner-compatible)
124+
- Pre-commit hook runs the split tests (`e2e-provision-and-destroy-tests` + `e2e-config-tests`) for GitHub Copilot compatibility
124125
- See [`docs/e2e-testing.md`](../docs/e2e-testing.md) for detailed information about CI limitations
125126

126127
Follow the project conventions and ensure all checks pass.

docs/contributing/commit-process.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,29 @@ This script runs all mandatory checks:
134134
2. **Run all linters**: `cargo run --bin linter all` (stable & nightly toolchains)
135135
3. **Run tests**: `cargo test`
136136
4. **Test documentation builds**: `cargo doc --no-deps --bins --examples --workspace --all-features`
137-
5. **Run E2E tests**: `cargo run --bin e2e-tests-full`
137+
5. **Run E2E provision and destroy tests**: `cargo run --bin e2e-provision-and-destroy-tests`
138+
6. **Run E2E configuration tests**: `cargo run --bin e2e-config-tests`
139+
7. **Run code coverage check**: `cargo cov-check` (informational only)
138140

139141
**All checks must pass** before committing. Fix any reported issues.
140142

143+
### E2E Test Execution Strategy
144+
145+
The pre-commit script runs E2E tests as **two separate commands** instead of a single comprehensive test:
146+
147+
- **Provision and Destroy Tests**: Test infrastructure lifecycle (LXD VMs)
148+
- **Configuration Tests**: Test software installation and configuration (Docker containers)
149+
150+
This split approach provides the same comprehensive coverage while being compatible with GitHub Actions runners. The split is necessary because GitHub Actions has networking limitations with nested LXD VMs that prevent the full E2E test suite from running.
151+
152+
**For local development**, you can still run the full E2E test suite manually for convenience:
153+
154+
```bash
155+
cargo run --bin e2e-tests-full
156+
```
157+
158+
This provides the same coverage in a single run but is only supported in local environments with proper LXD networking.
159+
141160
### Running Individual Linters
142161

143162
If you need to run specific linters for debugging:

0 commit comments

Comments
 (0)