Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporarily disable test script in GitHub-Actions - #34 #36

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ jobs:
- name: Build
run: esy build

- name: Test
run: esy test
# TODO: Reactivate test, when https://github.com/woeps/refabricator/issues/34 is resolved
# - name: Test
# run: esy test

- name: Build docs
run: esy doc
2 changes: 1 addition & 1 deletion bin/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(executable
(name refabricate)
(libraries console.lib refabricator))
(libraries console.lib refabricator fmt.cli fmt.tty cmdliner logs logs.cli logs.fmt))
59 changes: 57 additions & 2 deletions bin/refabricate.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
open Refabricator.Main;

let () =
let generate = () => {
Logs.app(m =>
m("REFABRICATE - static site generator for/in ReasonMl & Ocaml")
);

[
fromMd("pages")
|> between((
Expand All @@ -14,4 +18,55 @@ let () =
),
]
|> from
|> toFiles({path: "generated", extension: Some("html")});
|> toFiles({path: "generated", extension: Some("html")});
};

let setup_log = (style_renderer, level) => {
Fmt_tty.setup_std_outputs(~style_renderer?, ());
Logs.set_level(level);
Logs.set_reporter(Logs_fmt.reporter());
();
};

open Cmdliner;

let setup_log =
Term.(
const(setup_log)
$ Fmt_cli.style_renderer(~docs="MISC", ())
$ Logs_cli.level(
~env=
Arg.env_var(
~docs="LOGGING",
~doc="environment variable for option --verbosity.",
"REFABRICATE_LOG_LEVEL",
),
~docs="LOGGING",
(),
)
);

let main = () =>
switch (
Term.(
eval((
const(generate) $ setup_log,
Term.info(
"refabricate",
~doc="static site generator for/in ReasonMl & Ocaml",
),
))
)
) {
| `Error(_) => exit(1)
| _ =>
exit(
if (Logs.err_count() > 0) {
1;
} else {
0;
},
)
};

let () = main();
Loading