refactor: split CI into reusable workflows#1
Merged
airscripts merged 6 commits intomasterfrom Apr 21, 2026
Merged
Conversation
- 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Split monolithic CI into reusable workflow files with proper dependencies:
Flow: verify → test → build
verify.yml
/// Test asset matching with only checksum files
#[test]
fn test_find_matching_asset_only_checksums() {
use gitclaw::github::{find_matching_asset, Asset, Platform, Release};
let release = Release {
tag_name: "v1.0.0".to_string(),)
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
main.yml
Orchestrator that chains workflows with dependencies
Benefits