Skip to content

refactor: split CI into reusable workflows#1

Merged
airscripts merged 6 commits intomasterfrom
refactor/split-ci
Apr 21, 2026
Merged

refactor: split CI into reusable workflows#1
airscripts merged 6 commits intomasterfrom
refactor/split-ci

Conversation

@clawdeeo
Copy link
Copy Markdown
Collaborator

Changes

Split monolithic CI into reusable workflow files with proper dependencies:

Flow: verify → test → build

verify.yml

  • Format check (Diff in /root/.openclaw/workspace/projects/gitclaw/tests/error_handling.rs:109:
    /// Test asset matching with only checksum files
    #[test]
    fn test_find_matching_asset_only_checksums() {
  • use gitclaw::github::{Asset, find_matching_asset, Platform, Release};
  • use gitclaw::github::{find_matching_asset, Asset, Platform, Release};

    let release = Release {
    tag_name: "v1.0.0".to_string(),)

  • Clippy lints ()

test.yml

running 12 tests
test github::tests::test_find_matching_asset ... ok
test github::tests::test_find_matching_asset_no_match ... ok
test github::tests::test_is_checksum_file ... ok
test github::tests::test_parse_package_invalid ... ok
test github::tests::test_parse_package_simple ... ok
test github::tests::test_parse_package_with_url ... ok
test github::tests::test_parse_package_with_version ... ok
test platform::tests::test_detect_platform ... ok
test platform::tests::test_find_best_asset ... ok
test platform::tests::test_score_linux_x86_64 ... ok
test registry::tests::test_registry_crud ... ok
test util::tests::test_format_bytes ... ok

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

running 12 tests
test github::tests::test_find_matching_asset ... ok
test github::tests::test_find_matching_asset_no_match ... ok
test github::tests::test_is_checksum_file ... ok
test github::tests::test_parse_package_invalid ... ok
test github::tests::test_parse_package_simple ... ok
test github::tests::test_parse_package_with_url ... ok
test github::tests::test_parse_package_with_version ... ok
test platform::tests::test_detect_platform ... ok
test platform::tests::test_find_best_asset ... ok
test platform::tests::test_score_linux_x86_64 ... ok
test registry::tests::test_registry_crud ... ok
test util::tests::test_format_bytes ... ok

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

running 16 tests
test test_detect_unknown_archive_type ... ok
test test_extract_corrupted_tar_gz ... ok
test test_extract_nonexistent_file ... ok
test test_extract_corrupted_zip ... ok
test test_find_matching_asset_empty_assets ... ok
test test_find_matching_asset_only_checksums ... ok
test test_github_error_display ... ok
test test_github_error_no_matching_asset ... ok
test test_github_error_release_not_found ... ok
test test_parse_empty_package ... ok
test test_parse_invalid_package_no_slash ... ok
test test_parse_package_empty_owner ... ok
test test_parse_package_empty_repo ... ok
test test_platform_current_unsupported ... ok
test test_parse_package_multiple_slashes ... ok
test test_registry_operations ... ok

test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

running 14 tests
test test_detect_archive_type_tar ... ok
test test_detect_archive_type_plain_binary ... ok
test test_detect_archive_type_tar_bz2 ... ok
test test_detect_archive_type_tar_gz ... ok
test test_detect_archive_type_tar_xz ... ok
test test_detect_archive_type_unknown ... ok
test test_detect_archive_type_zip ... ok
test test_extract_archive_nonexistent ... ok
test test_extract_archive_plain_binary ... ok
test test_extract_archive_tar_bz2 ... ok
test test_extract_archive_nested_dirs ... ok
test test_extract_archive_tar_xz ... ok
test test_extract_archive_tar_gz ... ok
test test_extract_archive_zip ... ok

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

running 8 tests
test test_github_client_creation ... ignored, requires network access
test test_github_client_with_token ... ignored, requires network access
test test_asset_struct_creation ... ok
test test_parse_package_empty ... ok
test test_parse_package_invalid_no_owner ... ok
test test_parse_package_simple ... ok
test test_parse_package_with_version ... ok
test test_release_struct_creation ... ok

test result: ok. 6 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s

running 16 tests
test test_arch_equality ... ok
test test_arch_detection ... ok
test test_arch_variants ... ok
test test_current_platform ... ok
test test_find_best_asset_multiple_matches ... ok
test test_find_best_asset_no_match ... ok
test test_find_best_asset_single_match ... ok
test test_os_detection ... ok
test test_os_equality ... ok
test test_os_variants ... ok
test test_platform_error_display ... ok
test test_score_asset_linux_amd64 ... ok
test test_score_asset_linux_x86_64 ... ok
test test_score_asset_macos ... ok
test test_score_asset_no_match ... ok
test test_score_asset_windows ... ok

test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

running 10 tests
test test_bin_dir ... ok
test test_gitclaw_home ... ok
test test_installed_package_struct ... ok
test test_installed_package_equality ... ok
test test_registry_add ... ok
test test_registry_get ... ok
test test_registry_is_installed ... ok
test test_registry_remove ... ok
test test_registry_struct ... ok
test test_serialize_deserialize ... ok

test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s on Linux, macOS, Windows

build.yml

  • Release build on Linux, macOS, Windows
  • Upload artifacts

main.yml

Orchestrator that chains workflows with dependencies

Benefits

  • Modular, reusable workflows
  • Clear dependency chain
  • Easier to maintain and extend
  • Parallel execution where possible

- verify.yml: fmt and clippy checks
- test.yml: cargo test on Linux/macOS/Windows
- build.yml: release build with artifact upload
- main.yml: orchestrator with dependencies

Flow: verify -> test -> build
- Use rust:1.75-slim container for Ubuntu jobs (lighter)
- Keep dtolnay/rust-toolchain for macOS/Windows
- Rename workflow from CI to Main
- Fix cargo fmt in tests/error_handling.rs
- test.yml: explicit test-linux, test-macos, test-windows jobs
- build.yml: explicit build-linux, build-macos, build-windows jobs
- Remove matrix strategy and OS conditionals
- Cleaner, easier to maintain
- Verify / Format, Verify / Clippy
- Test / Linux, Test / macOS, Test / Windows
- Build / Linux, Build / macOS, Build / Windows
Job names: linux, macos, windows (under their workflows)
Workflow names: Verify, Test, Build (in main.yml)
@airscripts airscripts merged commit 71bbcfb into master Apr 21, 2026
8 checks passed
@airscripts airscripts added the enhancement New feature or request label Apr 21, 2026
@clawdeeo clawdeeo deleted the refactor/split-ci branch April 22, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants