Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
88d0f6c
Initialize CLI branch main entry point
etcoder-642 Jun 15, 2026
13bf712
Implement initial FlowHook CLI [experimental]
etcoder-642 Jun 20, 2026
70675ea
Added a light weight cli layer using the cli11 library.
etcoder-642 Jun 24, 2026
e3f3e3e
Create CLI11.hpp
etcoder-642 Jun 24, 2026
20351ca
Implement path and pattern ignoring for file watching
etcoder-642 Jun 24, 2026
fd0e7a9
Update Task struct and constructor, and also update config testing
etcoder-642 Jun 24, 2026
e5e3fce
Implement verbose logging mechanism
etcoder-642 Jun 24, 2026
5d3399f
Refactor task identification and reorganize CLI code
etcoder-642 Jun 25, 2026
28d7046
Add cli branch to test workflow triggers
etcoder-642 Jun 25, 2026
83f06ad
Add CLI subcommands for task management
etcoder-642 Jun 25, 2026
7dc881a
Refactor CLI and logging architecture
etcoder-642 Jun 29, 2026
45e80a6
Refactor list command and add watch list functionality
etcoder-642 Jun 29, 2026
ed46da5
Add quiet mode to suppress build output
etcoder-642 Jun 29, 2026
d3ea89c
Remove cli branch from test workflow triggers
etcoder-642 Jun 29, 2026
e8cfce7
Add remove command and implement ignore list management
etcoder-642 Jun 29, 2026
0697f82
Add remove command to CLI
etcoder-642 Jun 29, 2026
9dd8ba7
Add confirmation prompt and fix ignored path/pattern logic
etcoder-642 Jun 29, 2026
eb6404d
Rename config file and update log file naming convention
etcoder-642 Jun 29, 2026
72f801c
Update test configuration and execution workflow
etcoder-642 Jun 29, 2026
9f1e6c2
updated test for the session logger
etcoder-642 Jun 29, 2026
84af010
Refactor path handling and improve task reporting
etcoder-642 Jun 30, 2026
d218676
Update Task constructor arguments in unit tests
etcoder-642 Jun 30, 2026
00aec76
Refactor task identification to use paths
etcoder-642 Jun 30, 2026
8071f39
Increase default max depth for path watching
etcoder-642 Jun 30, 2026
254f2b8
Persist task state and update default watching depth
etcoder-642 Jun 30, 2026
e0af4f3
Add set command and implement task settings
etcoder-642 Jun 30, 2026
3332f3c
Added bash script to test the CLI layer
etcoder-642 Jun 30, 2026
0ed4881
Add -f flag to remove command and add unit tests
etcoder-642 Jul 1, 2026
d6b6e0f
Add check command to CLI
etcoder-642 Jul 1, 2026
bc8b238
Implement task configuration settings
etcoder-642 Jul 1, 2026
d68f330
Add CLI integration tests to CI workflow
etcoder-642 Jul 1, 2026
88828b9
Update tests.yml
etcoder-642 Jul 1, 2026
b983657
Remove redundant directory changes in test scripts
etcoder-642 Jul 1, 2026
e1e570d
Install flowhook binary to bin directory
etcoder-642 Jul 1, 2026
43d360d
Update installation targets for flowhook_cli
etcoder-642 Jul 1, 2026
3cc643a
Ignore paths matching ignore patterns
etcoder-642 Jul 1, 2026
bdac0c4
Handle missing paths during initialization
etcoder-642 Jul 1, 2026
4e96565
Merge pull request #6 from etcoder-642/test/all
etcoder-642 Jul 1, 2026
2abbcfa
Docs: Overhaul README with new project info and CLI usage
etcoder-642 Jul 1, 2026
7a2ec82
Refactor CMake build system and add version flag
etcoder-642 Jul 1, 2026
0c94b5e
Update README table of contents and formatting
etcoder-642 Jul 1, 2026
0a1b611
Update include paths for test_config_manager
etcoder-642 Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 31 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
name: Tests

on:
push:
branches: [tests, core, main]
pull_request:
branches: [main]
push:
branches: [dev, main, test/all]
pull_request:
branches: [main]

jobs:
build-and-test:
runs-on: ubuntu-latest
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build

- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$PWD/vcpkg" >> $GITHUB_ENV
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$PWD/vcpkg" >> $GITHUB_ENV

- name: Configure
run: cmake -B build -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
- name: Configure
run: cmake -B build -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake

- name: Build
run: cmake --build build
- name: Build
run: cmake --build build

- name: Run tests
run: ctest --test-dir build --output-on-failure
- name: Run tests
run: cd build && ./test_config_manager && ./test_task_runner && ./test_session_logger && ./test_flowhook_core

- name: Install flowhook binary
run: |
sudo cmake --install build
which flowhook || echo "flowhook not found after install"

- name: Run CLI tests
run: bash cli/tests/test_cli.sh
71 changes: 44 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
configure_file(src/version.h.in version.h)
set(CMAKE_CXX_STANDARD 20)

find_package(ftxui CONFIG REQUIRED)
option(BUILD_TESTING "Build the test suite" ON)

# core library
add_library(flowhook_lib
Expand All @@ -16,39 +16,56 @@ add_library(flowhook_lib
src/config_manager.cpp
)

target_link_libraries(flowhook_lib PRIVATE ftxui::screen ftxui::dom ftxui::component)
target_include_directories(flowhook_lib PUBLIC src/include)
target_include_directories(flowhook_lib PUBLIC src/include ${CMAKE_CURRENT_BINARY_DIR})

# main executables
add_executable(flowhook src/main.cpp)
target_link_libraries(flowhook PRIVATE flowhook_lib)
add_executable(flowhook_core src/main.cpp)
target_link_libraries(flowhook_core PRIVATE flowhook_lib)


if(BUILD_TESTING)
# tests
add_executable(test_filewatcher tests/unit/test_filewatcher.cpp)
target_link_libraries(test_filewatcher PRIVATE flowhook_lib)
target_include_directories(test_filewatcher PRIVATE tests)

# tests
add_executable(test_filewatcher tests/unit/test_filewatcher.cpp)
target_link_libraries(test_filewatcher PRIVATE flowhook_lib)
target_include_directories(test_filewatcher PRIVATE tests)
add_executable(test_task_runner tests/unit/test_task_runner.cpp)
target_link_libraries(test_task_runner PRIVATE flowhook_lib)
target_include_directories(test_task_runner PRIVATE tests)

add_executable(test_task_runner tests/unit/test_task_runner.cpp)
target_link_libraries(test_task_runner PRIVATE flowhook_lib)
target_include_directories(test_task_runner PRIVATE tests)
add_executable(test_session_logger tests/unit/test_session_logger.cpp)
target_link_libraries(test_session_logger PRIVATE flowhook_lib)
target_include_directories(test_session_logger PRIVATE tests)

add_executable(test_session_logger tests/unit/test_session_logger.cpp)
target_link_libraries(test_session_logger PRIVATE flowhook_lib)
target_include_directories(test_session_logger PRIVATE tests)
add_executable(test_config_manager tests/unit/test_config_manager.cpp)
target_link_libraries(test_config_manager PRIVATE flowhook_lib)
target_include_directories(test_config_manager PRIVATE tests)
target_include_directories(test_config_manager PUBLIC tests/unit ${CMAKE_CURRENT_BINARY_DIR})
target_compile_definitions(test_config_manager PRIVATE FLOWHOOK_TESTING)

add_executable(test_config_manager tests/unit/test_config_manager.cpp)
target_link_libraries(test_config_manager PRIVATE flowhook_lib)
target_include_directories(test_config_manager PRIVATE tests)
target_compile_definitions(test_config_manager PRIVATE FLOWHOOK_TESTING)
add_executable(test_flowhook_core tests/integration/test_flowhook_core.cpp)
target_link_libraries(test_flowhook_core PRIVATE flowhook_lib)
target_include_directories(test_flowhook_core PRIVATE tests)

add_executable(test_flowhook_core tests/integration/test_flowhook_core.cpp)
target_link_libraries(test_flowhook_core PRIVATE flowhook_lib)
target_include_directories(test_flowhook_core PRIVATE tests)
enable_testing()
add_test(NAME flowhook_filewatcher_tests COMMAND test_filewatcher)
add_test(NAME flowhook_task_runner_tests COMMAND test_task_runner)
add_test(NAME flowhook_session_logger_tests COMMAND test_session_logger)
add_test(NAME flowhook_config_manager_tests COMMAND test_config_manager)
add_test(NAME flowhook_core_tests COMMAND test_flowhook_core)
endif()

add_executable(flowhook cli/src/main.cpp
cli/src/commands/add.cpp
cli/src/commands/run.cpp
cli/src/commands/init.cpp
cli/src/commands/list.cpp
cli/src/commands/remove.cpp
cli/src/commands/set.cpp
cli/src/commands/check.cpp)
target_link_libraries(flowhook PRIVATE flowhook_lib)
target_include_directories(flowhook PRIVATE cli/src)
target_include_directories(flowhook PRIVATE cli/src ${CMAKE_CURRENT_BINARY_DIR})

enable_testing()
add_test(NAME flowhook_filewatcher_tests COMMAND test_filewatcher)
add_test(NAME flowhook_task_runner_tests COMMAND test_task_runner)
add_test(NAME flowhook_session_logger_tests COMMAND test_session_logger)
add_test(NAME flowhook_config_manager_tests COMMAND test_config_manager)
add_test(NAME flowhook_core_tests COMMAND test_flowhook_core)
install(TARGETS flowhook DESTINATION bin)
Loading
Loading