refactor: apply review comments
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon 2026-01-28 14:42:16 +01:00
parent 050ca4a13c
commit ea3bdcaa65
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
5 changed files with 81 additions and 13 deletions

View file

@ -172,7 +172,7 @@ mix test
#### CI/CD Integration
- **Standard CI:** Runs `mix test --exclude slow` for faster feedback loops (~6 minutes)
- **Nightly Builds:** Separate pipeline runs daily and executes `mix test --only slow` (~1.3 minutes)
- **Nightly Builds:** Separate pipeline runs daily and executes `mix test` (all tests, including slow) for comprehensive coverage (~7.4 minutes)
- **Pre-Merge:** Full test suite (`mix test`) runs before merging to main
- **Manual Execution:** Can be triggered via Drone CLI or Web UI
@ -535,13 +535,18 @@ mix test test/mv_web/member_live/index_member_fields_display_test.exs --slowest
- Execution time: ~6 minutes
- Command: `mix test --exclude slow` or `just test-fast`
**Slow/Nightly Tests:**
- Tests tagged with `@tag :slow` (25 tests)
**Slow Tests:**
- Tests tagged with `@tag :slow` or `@describetag :slow` (25 tests)
- Low risk, >1 second execution time
- UI/Display tests, workflow details, edge cases
- UI/Display tests, workflow details, edge cases, performance tests
- Execution time: ~1.3 minutes
- Command: `mix test --only slow` or `just test-slow`
- Run in nightly CI builds
- Excluded from standard CI runs
**Nightly CI Builds:**
- Runs all tests (`mix test`) for comprehensive coverage
- Execution time: ~7.4 minutes
- Ensures full test coverage including slow/performance tests
**All Tests:**
- Includes both fast and slow tests
@ -692,13 +697,13 @@ A: Monitor for 2-3 months. If no seeds-related bugs appear that would have been
A: Consider running the full test suite (including slow tests) before major releases. Daily development uses the optimized suite.
**Q: How do I add a new performance test?**
A: Tag it with `@tag :slow` or `@moduletag :slow`. See "Performance Test Guidelines" section above.
A: Tag it with `@tag :slow` for individual tests or `@describetag :slow` for describe blocks. Use `@describetag` instead of `@moduletag` to avoid tagging unrelated tests. Include measurable performance assertions (query counts, timing with tolerance, etc.). See "Performance Test Guidelines" section above.
**Q: Can I run slow tests locally?**
A: Yes, use `just test-slow` or `mix test --only slow`. They're excluded from standard runs for faster feedback.
**Q: What is the "nightly suite"?**
A: The "nightly suite" refers to tests tagged with `@tag :slow`. We use a single tag (`:slow`) for both performance tests and tests suitable for nightly execution. All tests tagged with `:slow` are excluded from standard runs and can be executed in nightly CI builds.
A: The "nightly suite" refers to the nightly CI pipeline that runs **all tests** (`mix test`), including slow tests. Tests tagged with `@tag :slow` or `@describetag :slow` are excluded from standard CI runs for faster feedback, but are included in the nightly full test suite for comprehensive coverage.
**Q: Which tests should I tag as `:slow`?**
A: Tag tests with `@tag :slow` if they: (1) take >1 second, (2) have low risk (not critical for catching regressions), and (3) test UI/Display/Formatting or workflow details. See "Test Tagging Guidelines" section for details.