ci/test: add test suite and release label exclusions #3

Merged
rootiest merged 3 commits from ci/tests into main 2026-04-29 02:44:38 +00:00
Owner

This PR introduces a comprehensive test suite for color-tool and improves the release workflow with label-based exclusions.

🧪 Test Suite

  • Isolated Mock Environment: Tests run in a temporary directory with a restricted PATH.
  • Mocked Integrations:
    • notify-send: Captures notification payloads to verify urgency and content.
    • wl-copy: Captures clipboard content.
    • python3: Simulates the KDE color picker behavior.
  • Coverage:
    • Basic and multi-format color conversions.
    • Configuration file loading and overrides.
    • Clipboard and notification triggering.
  • Documentation: Added a section to README.md explaining how to run the tests.

🚀 CI Improvements

  • Release Label Exclusions: The release workflow now checks for Kind/Testing or Kind/Documentation labels. If either is present, the automatic release and tag generation will be skipped on merge to main.

Usage

To run the tests locally:

./tests/run_tests.sh

Verified all 7 tests passing in the local environment and confirmed the workflow logic for label filtering.

This PR introduces a comprehensive test suite for `color-tool` and improves the release workflow with label-based exclusions. ### 🧪 Test Suite - **Isolated Mock Environment**: Tests run in a temporary directory with a restricted `PATH`. - **Mocked Integrations**: - `notify-send`: Captures notification payloads to verify urgency and content. - `wl-copy`: Captures clipboard content. - `python3`: Simulates the KDE color picker behavior. - **Coverage**: - Basic and multi-format color conversions. - Configuration file loading and overrides. - Clipboard and notification triggering. - **Documentation**: Added a section to `README.md` explaining how to run the tests. ### 🚀 CI Improvements - **Release Label Exclusions**: The release workflow now checks for `Kind/Testing` or `Kind/Documentation` labels. If either is present, the automatic release and tag generation will be skipped on merge to `main`. ### Usage To run the tests locally: ```bash ./tests/run_tests.sh ``` Verified all 7 tests passing in the local environment and confirmed the workflow logic for label filtering.
rootiest added 1 commit 2026-04-29 02:32:25 +00:00
- Implement tests/run_tests.sh with mocked environment
- Cover color conversion, multi-format output, and config loading
- Verify clipboard and notification integrations via mocks
- Document testing procedure in README.md
rootiest added 2 commits 2026-04-29 02:42:01 +00:00
Add a condition to the release workflow to skip execution if the PR
is labeled with 'Kind/Testing' or 'Kind/Documentation'. This prevents
unnecessary releases for non-functional changes.
Merge branch 'ci/label-exclusions' into ci/tests
Release on Merge / release (pull_request) Has been skipped
078118f689
rootiest changed title from test: add comprehensive bash test suite to ci/test: add test suite and release label exclusions 2026-04-29 02:42:38 +00:00
rootiest added the Kind/Testing label 2026-04-29 02:43:31 +00:00
rootiest merged commit 100fecda18 into main 2026-04-29 02:44:38 +00:00
rootiest deleted branch ci/tests 2026-04-29 02:44:38 +00:00
Sign in to join this conversation.