Add CI automation to run tests on every commit #191

Closed
opened 2026-02-03 08:58:54 +00:00 by mprihoda · 1 comment
mprihoda commented 2026-02-03 08:58:54 +00:00 (Migrated from github.com)

Problem

Recent config model refactoring broke the ./iw init and ./iw doctor commands, but this wasn't caught by our test suite until manual testing revealed the issues.

Specifically:

  • Changes to ProjectConfiguration API (moving to nested TrackerConfig and ProjectConfig structures) broke compatibility
  • The init.scala and doctor.scala commands were using the old constructor signature instead of the factory method
  • Commands are not compiled or tested as part of ./iw test - tests only cover core modules, not the commands that use them
  • Tests either didn't cover this scenario or weren't run before merging

Root Cause

We currently don't have automated CI that runs tests on every commit/PR. Additionally, our test suite has a critical gap:

  1. Tests must be run manually with ./iw test
  2. Contributors might not know to run tests
  3. Commands in .iw/commands/ are not compiled during testing - only the core modules are tested
  4. Easy to merge breaking changes that affect commands

Solution

Implement GitHub Actions CI workflow that:

  • Runs on every push and pull request
  • Executes ./iw test (unit tests, command compilation, and E2E tests)
  • Fails the build if tests fail or commands don't compile
  • Prevents merging PRs with failing tests

Note: A new ./iw test compile command has been added to check that all 21 commands compile successfully with the core modules. This would have caught both the init and doctor command breakages.

Acceptance Criteria

  • GitHub Actions workflow added to .github/workflows/
  • Workflow runs on push to main and on all PRs
  • Workflow executes all tests (./iw test which now includes command compilation)
  • Workflow status is visible on PRs
  • Documentation updated to mention CI automation and command compilation checking

Additional Context

This issue was discovered when testing ./iw init in another project after recent config model changes. The command failed with compilation errors about missing constructor parameters. Running the new ./iw test compile command revealed that doctor.scala was also broken. Both have been fixed, but without CI, similar breakages could easily happen again.

## Problem Recent config model refactoring broke the `./iw init` and `./iw doctor` commands, but this wasn't caught by our test suite until manual testing revealed the issues. Specifically: - Changes to `ProjectConfiguration` API (moving to nested `TrackerConfig` and `ProjectConfig` structures) broke compatibility - The `init.scala` and `doctor.scala` commands were using the old constructor signature instead of the factory method - **Commands are not compiled or tested as part of `./iw test`** - tests only cover core modules, not the commands that use them - Tests either didn't cover this scenario or weren't run before merging ## Root Cause We currently don't have automated CI that runs tests on every commit/PR. Additionally, our test suite has a critical gap: 1. Tests must be run manually with `./iw test` 2. Contributors might not know to run tests 3. **Commands in `.iw/commands/` are not compiled during testing** - only the core modules are tested 4. Easy to merge breaking changes that affect commands ## Solution Implement GitHub Actions CI workflow that: - Runs on every push and pull request - Executes `./iw test` (unit tests, **command compilation**, and E2E tests) - Fails the build if tests fail or commands don't compile - Prevents merging PRs with failing tests **Note:** A new `./iw test compile` command has been added to check that all 21 commands compile successfully with the core modules. This would have caught both the `init` and `doctor` command breakages. ## Acceptance Criteria - [ ] GitHub Actions workflow added to `.github/workflows/` - [ ] Workflow runs on push to `main` and on all PRs - [ ] Workflow executes all tests (`./iw test` which now includes command compilation) - [ ] Workflow status is visible on PRs - [ ] Documentation updated to mention CI automation and command compilation checking ## Additional Context This issue was discovered when testing `./iw init` in another project after recent config model changes. The command failed with compilation errors about missing constructor parameters. Running the new `./iw test compile` command revealed that `doctor.scala` was also broken. Both have been fixed, but without CI, similar breakages could easily happen again.
mprihoda commented 2026-03-14 10:51:21 +00:00 (Migrated from github.com)

Closed by e3b73ca feat(quality): Add CI workflow, git hooks, scalafix config, and CONTRIBUTING.md — CI now runs on every commit.

Closed by e3b73ca feat(quality): Add CI workflow, git hooks, scalafix config, and CONTRIBUTING.md — CI now runs on every commit.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#191
No description provided.