Skip to content

Commit

Permalink
Disable tests requiring Docker under Windows GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Nov 2, 2022
1 parent 73fa389 commit 95c70ad
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions test/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -775,18 +775,7 @@ let () =
in
test_case name speed wrap
in
Lwt_main.run begin
let manifest =
if not Sys.win32 then [test_case "Copy using Manifest" `Quick test_copy_ocaml]
else []
in
run "OBuilder" [
"spec", [
test_case_sync "Sexp" `Quick test_sexp;
test_case_sync "Cache ID" `Quick test_cache_id;
test_case_sync "Docker Windows" `Quick test_docker_windows;
test_case_sync "Docker UNIX" `Quick test_docker_unix;
];
let needs_docker = [
"build", [
test_case "Simple" `Quick test_simple;
test_case "Prune" `Quick test_prune;
Expand All @@ -801,8 +790,25 @@ let () =
test_case "Delete" `Quick test_delete;
];
"secrets", [
test_case "Simple" `Quick test_secrets_simple;
test_case "No secret provided" `Quick test_secrets_not_provided;
test_case "Simple" `Quick test_secrets_simple;
test_case "No secret provided" `Quick test_secrets_not_provided;
];
] in
let is_win32_gha =
match Sys.getenv "CI", Sys.getenv "GITHUB_ACTIONS", Sys.win32 with
| "true", "true", true -> false
| _ | exception _ -> true in
Lwt_main.run begin
let manifest =
if not Sys.win32 then [test_case "Copy using Manifest" `Quick test_copy_ocaml]
else []
in
run "OBuilder" ([
"spec", [
test_case_sync "Sexp" `Quick test_sexp;
test_case_sync "Cache ID" `Quick test_cache_id;
test_case_sync "Docker Windows" `Quick test_docker_windows;
test_case_sync "Docker UNIX" `Quick test_docker_unix;
];
"tar_transfer", [
test_case "Long filename" `Quick test_tar_long_filename;
Expand All @@ -812,5 +818,5 @@ let () =
test_case "Execute a process" `Quick test_exec_nul;
test_case "Read stdout of a process" `Quick test_pread_nul;
];
]
] @ (if not is_win32_gha then needs_docker else []))
end

0 comments on commit 95c70ad

Please sign in to comment.