diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4979a0..a815cf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup OCaml - uses: ocaml/setup-ocaml@v3 + uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} opam-repositories: | @@ -47,10 +47,10 @@ jobs: run: git diff --exit-code - name: Lint opam - uses: ocaml/setup-ocaml/lint-opam@v3 + uses: ocaml/setup-ocaml/lint-opam@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8 - name: Lint fmt - uses: ocaml/setup-ocaml/lint-fmt@v3 + uses: ocaml/setup-ocaml/lint-fmt@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8 - name: Lint doc - uses: ocaml/setup-ocaml/lint-doc@v3 + uses: ocaml/setup-ocaml/lint-doc@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8 diff --git a/.github/workflows/deploy-doc.yml b/.github/workflows/deploy-doc.yml index aadad5b..11c1def 100644 --- a/.github/workflows/deploy-doc.yml +++ b/.github/workflows/deploy-doc.yml @@ -16,12 +16,12 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v5 + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version: 24 cache: npm @@ -32,7 +32,7 @@ jobs: run: npm ci - name: Setup OCaml - uses: ocaml/setup-ocaml@v3 + uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8 with: ocaml-compiler: "5.3.x" opam-repositories: | @@ -57,7 +57,7 @@ jobs: run: npm run build - name: Upload Build Artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 with: path: doc/build @@ -83,4 +83,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 diff --git a/.github/workflows/test-deploy-doc.yml b/.github/workflows/test-deploy-doc.yml index 8e171cd..b244566 100644 --- a/.github/workflows/test-deploy-doc.yml +++ b/.github/workflows/test-deploy-doc.yml @@ -16,12 +16,12 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v5 + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version: 24 cache: npm @@ -32,7 +32,7 @@ jobs: run: npm ci - name: Setup OCaml - uses: ocaml/setup-ocaml@v3 + uses: ocaml/setup-ocaml@dec6499fef64fc5d7ed43d43a87251b7b1c306f5 # v3.4.8 with: ocaml-compiler: "5.3.x" opam-repositories: | diff --git a/.ocamlformat b/.ocamlformat index e6fd08a..1484724 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,3 +1,3 @@ -version=0.27.0 +version=0.28.1 profile=janestreet parse-docstrings=true diff --git a/bin/main.ml b/bin/main.ml deleted file mode 100644 index ed85bf8..0000000 --- a/bin/main.ml +++ /dev/null @@ -1 +0,0 @@ -let () = Command_unix_for_opam.run Mylib.main diff --git a/doc-experiment-docusaurus-dev.opam b/doc-experiment-docusaurus-dev.opam new file mode 100644 index 0000000..2d04691 --- /dev/null +++ b/doc-experiment-docusaurus-dev.opam @@ -0,0 +1,35 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "Dev targets and documentation" +maintainer: ["Mathieu Barbin"] +authors: ["Mathieu Barbin"] +license: "MIT" +homepage: "https://github.com/mbarbin/doc-experiment-docusaurus" +doc: "https://mbarbin.github.io/doc-experiment-docusaurus/" +bug-reports: "https://github.com/mbarbin/doc-experiment-docusaurus/issues" +depends: [ + "dune" {>= "3.17"} + "ocaml" {>= "5.2"} + "doc-experiment-docusaurus-tests" {= version} + "mylib" {= version} + "myotherlib" {= version} + "mdx" {>= "2.4"} + "ocamlformat" {= "0.28.1"} + "sherlodoc" {>= "0.2"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/mbarbin/doc-experiment-docusaurus.git" diff --git a/doc-experiment-docusaurus-tests.opam b/doc-experiment-docusaurus-tests.opam new file mode 100644 index 0000000..c186695 --- /dev/null +++ b/doc-experiment-docusaurus-tests.opam @@ -0,0 +1,32 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "Tests for doc-experiment-docusaurus" +maintainer: ["Mathieu Barbin"] +authors: ["Mathieu Barbin"] +license: "MIT" +homepage: "https://github.com/mbarbin/doc-experiment-docusaurus" +doc: "https://mbarbin.github.io/doc-experiment-docusaurus/" +bug-reports: "https://github.com/mbarbin/doc-experiment-docusaurus/issues" +depends: [ + "dune" {>= "3.17"} + "ocaml" {>= "5.2"} + "mylib" {= version} + "myotherlib" {= version} + "ppx_expect" {>= "v0.17" & < "v0.18"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/mbarbin/doc-experiment-docusaurus.git" diff --git a/doc/docs/tutorials/hello-mylib/README.md b/doc/docs/tutorials/hello-mylib/README.md index 2cebdcc..65e07d6 100644 --- a/doc/docs/tutorials/hello-mylib/README.md +++ b/doc/docs/tutorials/hello-mylib/README.md @@ -8,8 +8,8 @@ the doc up to date. We can make use of code defined in libraries. ```ocaml -# Stdio.print_s Mylib.hello_world -"Hello, World!" +# print_endline Mylib.hello_world +Hello, World! - : unit = () ``` @@ -18,6 +18,6 @@ We can make use of code defined in libraries. We can make use of executables defined in packages. ```bash -$ mylib print -"Hello, World!" +$ mybin print +Hello, World! ``` diff --git a/doc/docs/tutorials/hello-mylib/dune b/doc/docs/tutorials/hello-mylib/dune index a10e6e2..c8d8c13 100644 --- a/doc/docs/tutorials/hello-mylib/dune +++ b/doc/docs/tutorials/hello-mylib/dune @@ -1,4 +1,5 @@ (mdx + (package doc-experiment-docusaurus-dev) (deps (package mylib)) (preludes prelude.txt)) diff --git a/dune-project b/dune-project index 8585289..7050ea3 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 3.16) +(lang dune 3.17) (name doc-experiment-docusaurus) @@ -17,75 +17,20 @@ (using mdx 0.4) +(implicit_transitive_deps false) + (package (name mylib) (synopsis "A package named mylib in this project") (depends (ocaml (>= 5.2)) - (base - (and - (>= v0.17) - (< v0.18))) - (command-unix-for-opam - (>= 0.0.2)) - (core - (and - (>= v0.17) - (< v0.18))) - (expect_test_helpers_core - (and - :with-test - (>= v0.17) - (< v0.18))) - (mdx - (>= 2.4)) - (ppx_compare - (and - (>= v0.17) - (< v0.18))) - (ppx_enumerate - (and - (>= v0.17) - (< v0.18))) - (ppx_expect - (and - :with-test - (>= v0.17) - (< v0.18))) - (ppx_hash - (and - (>= v0.17) - (< v0.18))) - (ppx_here - (and - (>= v0.17) - (< v0.18))) - (ppx_js_style - (and - :dev - (>= v0.17) - (< v0.18))) - (ppx_let - (and - (>= v0.17) - (< v0.18))) - (ppx_sexp_conv - (and - (>= v0.17) - (< v0.18))) - (ppx_sexp_value - (and - (>= v0.17) - (< v0.18))) - (sherlodoc - (and - :with-doc - (>= 0.2))) - (stdio - (and - (>= v0.17) - (< v0.18))))) + (cmdlang + (>= 0.0.9)) + (cmdlang-cmdliner-err-runner + (>= 0.0.16)) + (dune-build-info + (>= 3.17)))) (package (name myotherlib) @@ -93,64 +38,43 @@ (depends (ocaml (>= 5.2)) - (base - (and - (>= v0.17) - (< v0.18))) - (command-unix-for-opam - (>= 0.0.2)) - (core - (and - (>= v0.17) - (< v0.18))) - (expect_test_helpers_core - (and - :with-test - (>= v0.17) - (< v0.18))) - (ppx_compare - (and - (>= v0.17) - (< v0.18))) - (ppx_enumerate - (and - (>= v0.17) - (< v0.18))) + (cmdlang + (>= 0.0.9)) + (cmdlang-cmdliner-err-runner + (>= 0.0.16)))) + +(package + (name doc-experiment-docusaurus-tests) + (synopsis "Tests for doc-experiment-docusaurus") + (allow_empty) + (depends + (ocaml + (>= 5.2)) + (mylib + (= :version)) + (myotherlib + (= :version)) (ppx_expect - (and - :with-test - (>= v0.17) - (< v0.18))) - (ppx_hash - (and - (>= v0.17) - (< v0.18))) - (ppx_here - (and - (>= v0.17) - (< v0.18))) - (ppx_js_style - (and - :dev - (>= v0.17) - (< v0.18))) - (ppx_let - (and - (>= v0.17) - (< v0.18))) - (ppx_sexp_conv - (and - (>= v0.17) - (< v0.18))) - (ppx_sexp_value - (and - (>= v0.17) - (< v0.18))) - (sherlodoc - (and - :with-doc - (>= 0.2))) - (stdio (and (>= v0.17) (< v0.18))))) + +(package + (name doc-experiment-docusaurus-dev) + (synopsis "Dev targets and documentation") + (allow_empty) + (depends + (ocaml + (>= 5.2)) + (doc-experiment-docusaurus-tests + (= :version)) + (mylib + (= :version)) + (myotherlib + (= :version)) + (mdx + (>= 2.4)) + (ocamlformat + (= 0.28.1)) + (sherlodoc + (>= 0.2)))) diff --git a/dunolint b/dunolint new file mode 100644 index 0000000..3552342 --- /dev/null +++ b/dunolint @@ -0,0 +1,10 @@ +(lang dunolint 1.0) + +(rule + (cond + ((path (glob test/**)) + (enforce + (dune + (library + (and (not (has_field public_name)) + (package (equals doc-experiment-docusaurus-tests))))))))) diff --git a/lib/mylib/src/dune b/lib/mylib/src/dune deleted file mode 100644 index c6a2349..0000000 --- a/lib/mylib/src/dune +++ /dev/null @@ -1,25 +0,0 @@ -(library - (name mylib) - (public_name mylib) - (flags - :standard - -w - +a-4-40-41-42-44-45-48-66 - -warn-error - +a - -open - Base - -open - Stdio) - (libraries base core.command stdio) - (lint - (pps ppx_js_style -check-doc-comments)) - (preprocess - (pps - ppx_compare - ppx_enumerate - ppx_hash - ppx_here - ppx_let - ppx_sexp_conv - ppx_sexp_value))) diff --git a/lib/mylib/src/mylib.ml b/lib/mylib/src/mylib.ml deleted file mode 100644 index d70dd1c..0000000 --- a/lib/mylib/src/mylib.ml +++ /dev/null @@ -1,10 +0,0 @@ -let hello_world = [%sexp "Hello, World!"] - -let print_cmd = - Command.basic - ~summary:"print hello world" - (let%map_open.Command () = return () in - fun () -> print_s hello_world) -;; - -let main = Command.group ~summary:"" [ "print", print_cmd ] diff --git a/lib/mylib/src/mylib.mli b/lib/mylib/src/mylib.mli deleted file mode 100644 index b9a196d..0000000 --- a/lib/mylib/src/mylib.mli +++ /dev/null @@ -1,2 +0,0 @@ -val hello_world : Sexp.t -val main : Command.t diff --git a/lib/mylib/test/dune b/lib/mylib/test/dune deleted file mode 100644 index f696ead..0000000 --- a/lib/mylib/test/dune +++ /dev/null @@ -1,26 +0,0 @@ -(library - (name mylib_test) - (flags - :standard - -w - +a-4-40-41-42-44-45-48-66 - -warn-error - +a - -open - Base - -open - Expect_test_helpers_base) - (libraries base expect_test_helpers_core.expect_test_helpers_base mylib) - (inline_tests) - (lint - (pps ppx_js_style -check-doc-comments)) - (preprocess - (pps - ppx_compare - ppx_enumerate - ppx_expect - ppx_hash - ppx_here - ppx_let - ppx_sexp_conv - ppx_sexp_value))) diff --git a/lib/mylib/test/test__mylib.ml b/lib/mylib/test/test__mylib.ml deleted file mode 100644 index f6f5699..0000000 --- a/lib/mylib/test/test__mylib.ml +++ /dev/null @@ -1,4 +0,0 @@ -let%expect_test "hello" = - print_s Mylib.hello_world; - [%expect {| "Hello, World!" |}] -;; diff --git a/lib/myotherlib/src/dune b/lib/myotherlib/src/dune deleted file mode 100644 index 9765976..0000000 --- a/lib/myotherlib/src/dune +++ /dev/null @@ -1,25 +0,0 @@ -(library - (name myotherlib) - (public_name myotherlib) - (flags - :standard - -w - +a-4-40-41-42-44-45-48-66 - -warn-error - +a - -open - Base - -open - Stdio) - (libraries base core.command stdio) - (lint - (pps ppx_js_style -check-doc-comments)) - (preprocess - (pps - ppx_compare - ppx_enumerate - ppx_hash - ppx_here - ppx_let - ppx_sexp_conv - ppx_sexp_value))) diff --git a/lib/myotherlib/src/myotherlib.ml b/lib/myotherlib/src/myotherlib.ml deleted file mode 100644 index 533a996..0000000 --- a/lib/myotherlib/src/myotherlib.ml +++ /dev/null @@ -1,10 +0,0 @@ -let hello_world = [%sexp "Hello, World From My Other Lib!"] - -let print_cmd = - Command.basic - ~summary:"print hello world" - (let%map_open.Command () = return () in - fun () -> print_s hello_world) -;; - -let main = Command.group ~summary:"" [ "print", print_cmd ] diff --git a/lib/myotherlib/src/myotherlib.mli b/lib/myotherlib/src/myotherlib.mli deleted file mode 100644 index b9a196d..0000000 --- a/lib/myotherlib/src/myotherlib.mli +++ /dev/null @@ -1,2 +0,0 @@ -val hello_world : Sexp.t -val main : Command.t diff --git a/lib/myotherlib/test/dune b/lib/myotherlib/test/dune deleted file mode 100644 index 87dbab1..0000000 --- a/lib/myotherlib/test/dune +++ /dev/null @@ -1,29 +0,0 @@ -(library - (name myotherlib_test) - (flags - :standard - -w - +a-4-40-41-42-44-45-48-66 - -warn-error - +a - -open - Base - -open - Expect_test_helpers_base) - (libraries - base - expect_test_helpers_core.expect_test_helpers_base - myotherlib) - (inline_tests) - (lint - (pps ppx_js_style -check-doc-comments)) - (preprocess - (pps - ppx_compare - ppx_enumerate - ppx_expect - ppx_hash - ppx_here - ppx_let - ppx_sexp_conv - ppx_sexp_value))) diff --git a/lib/myotherlib/test/test__myotherlib.ml b/lib/myotherlib/test/test__myotherlib.ml deleted file mode 100644 index 4352d4a..0000000 --- a/lib/myotherlib/test/test__myotherlib.ml +++ /dev/null @@ -1,4 +0,0 @@ -let%expect_test "hello" = - print_s Myotherlib.hello_world; - [%expect {| "Hello, World From My Other Lib!" |}] -;; diff --git a/mylib.opam b/mylib.opam index 1f43675..9b45782 100644 --- a/mylib.opam +++ b/mylib.opam @@ -8,24 +8,11 @@ homepage: "https://github.com/mbarbin/doc-experiment-docusaurus" doc: "https://mbarbin.github.io/doc-experiment-docusaurus/" bug-reports: "https://github.com/mbarbin/doc-experiment-docusaurus/issues" depends: [ - "dune" {>= "3.16"} + "dune" {>= "3.17"} "ocaml" {>= "5.2"} - "base" {>= "v0.17" & < "v0.18"} - "command-unix-for-opam" {>= "0.0.2"} - "core" {>= "v0.17" & < "v0.18"} - "expect_test_helpers_core" {with-test & >= "v0.17" & < "v0.18"} - "mdx" {>= "2.4"} - "ppx_compare" {>= "v0.17" & < "v0.18"} - "ppx_enumerate" {>= "v0.17" & < "v0.18"} - "ppx_expect" {with-test & >= "v0.17" & < "v0.18"} - "ppx_hash" {>= "v0.17" & < "v0.18"} - "ppx_here" {>= "v0.17" & < "v0.18"} - "ppx_js_style" {dev & >= "v0.17" & < "v0.18"} - "ppx_let" {>= "v0.17" & < "v0.18"} - "ppx_sexp_conv" {>= "v0.17" & < "v0.18"} - "ppx_sexp_value" {>= "v0.17" & < "v0.18"} - "sherlodoc" {with-doc & >= "0.2"} - "stdio" {>= "v0.17" & < "v0.18"} + "cmdlang" {>= "0.0.9"} + "cmdlang-cmdliner-err-runner" {>= "0.0.16"} + "dune-build-info" {>= "3.17"} "odoc" {with-doc} ] build: [ diff --git a/myotherlib.opam b/myotherlib.opam index 29a2d5f..21660c3 100644 --- a/myotherlib.opam +++ b/myotherlib.opam @@ -8,23 +8,10 @@ homepage: "https://github.com/mbarbin/doc-experiment-docusaurus" doc: "https://mbarbin.github.io/doc-experiment-docusaurus/" bug-reports: "https://github.com/mbarbin/doc-experiment-docusaurus/issues" depends: [ - "dune" {>= "3.16"} + "dune" {>= "3.17"} "ocaml" {>= "5.2"} - "base" {>= "v0.17" & < "v0.18"} - "command-unix-for-opam" {>= "0.0.2"} - "core" {>= "v0.17" & < "v0.18"} - "expect_test_helpers_core" {with-test & >= "v0.17" & < "v0.18"} - "ppx_compare" {>= "v0.17" & < "v0.18"} - "ppx_enumerate" {>= "v0.17" & < "v0.18"} - "ppx_expect" {with-test & >= "v0.17" & < "v0.18"} - "ppx_hash" {>= "v0.17" & < "v0.18"} - "ppx_here" {>= "v0.17" & < "v0.18"} - "ppx_js_style" {dev & >= "v0.17" & < "v0.18"} - "ppx_let" {>= "v0.17" & < "v0.18"} - "ppx_sexp_conv" {>= "v0.17" & < "v0.18"} - "ppx_sexp_value" {>= "v0.17" & < "v0.18"} - "sherlodoc" {with-doc & >= "0.2"} - "stdio" {>= "v0.17" & < "v0.18"} + "cmdlang" {>= "0.0.9"} + "cmdlang-cmdliner-err-runner" {>= "0.0.16"} "odoc" {with-doc} ] build: [ diff --git a/bin/dune b/src/mylib/bin/dune similarity index 55% rename from bin/dune rename to src/mylib/bin/dune index ca7dc83..9865a81 100644 --- a/bin/dune +++ b/src/mylib/bin/dune @@ -1,6 +1,6 @@ (executable (name main) - (public_name mylib) + (public_name mybin) (package mylib) (flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a) - (libraries command-unix-for-opam mylib)) + (libraries cmdlang-cmdliner-err-runner dune-build-info mylib)) diff --git a/src/mylib/bin/main.ml b/src/mylib/bin/main.ml new file mode 100644 index 0000000..7baaac9 --- /dev/null +++ b/src/mylib/bin/main.ml @@ -0,0 +1,7 @@ +let version = + match Build_info.V1.version () with + | None -> "n/a" + | Some v -> Build_info.V1.Version.to_string v [@coverage off] +;; + +let () = Cmdlang_cmdliner_err_runner.run Mylib.main ~name:"mybin" ~version diff --git a/src/mylib/dune b/src/mylib/dune new file mode 100644 index 0000000..7685e3c --- /dev/null +++ b/src/mylib/dune @@ -0,0 +1,6 @@ +(library + (name mylib) + (public_name mylib) + (flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a -open Cmdlang) + (libraries cmdlang) + (preprocess no_preprocessing)) diff --git a/src/mylib/mylib.ml b/src/mylib/mylib.ml new file mode 100644 index 0000000..35b9aed --- /dev/null +++ b/src/mylib/mylib.ml @@ -0,0 +1,11 @@ +let hello_world = "Hello, World!" + +let print_cmd = + Command.make + ~summary:"print hello world" + (let open Command.Std in + let+ () = Arg.return () in + print_endline hello_world) +;; + +let main = Command.group ~summary:"" [ "print", print_cmd ] diff --git a/src/mylib/mylib.mli b/src/mylib/mylib.mli new file mode 100644 index 0000000..7272bdf --- /dev/null +++ b/src/mylib/mylib.mli @@ -0,0 +1,2 @@ +val hello_world : string +val main : unit Command.t diff --git a/src/myotherlib/dune b/src/myotherlib/dune new file mode 100644 index 0000000..45ac0a4 --- /dev/null +++ b/src/myotherlib/dune @@ -0,0 +1,6 @@ +(library + (name myotherlib) + (public_name myotherlib) + (flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a -open Cmdlang) + (libraries cmdlang) + (preprocess no_preprocessing)) diff --git a/src/myotherlib/myotherlib.ml b/src/myotherlib/myotherlib.ml new file mode 100644 index 0000000..d58e865 --- /dev/null +++ b/src/myotherlib/myotherlib.ml @@ -0,0 +1,11 @@ +let hello_world = "Hello, World From My Other Lib!" + +let print_cmd = + Command.make + ~summary:"print hello world" + (let open Command.Std in + let+ () = Arg.return () in + print_endline hello_world) +;; + +let main = Command.group ~summary:"" [ "print", print_cmd ] diff --git a/src/myotherlib/myotherlib.mli b/src/myotherlib/myotherlib.mli new file mode 100644 index 0000000..7272bdf --- /dev/null +++ b/src/myotherlib/myotherlib.mli @@ -0,0 +1,2 @@ +val hello_world : string +val main : unit Command.t diff --git a/test/mylib/dune b/test/mylib/dune new file mode 100644 index 0000000..9f33e25 --- /dev/null +++ b/test/mylib/dune @@ -0,0 +1,8 @@ +(library + (name mylib_test) + (package doc-experiment-docusaurus-tests) + (flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a) + (libraries mylib) + (inline_tests) + (preprocess + (pps ppx_expect))) diff --git a/test/mylib/test__mylib.ml b/test/mylib/test__mylib.ml new file mode 100644 index 0000000..ee05385 --- /dev/null +++ b/test/mylib/test__mylib.ml @@ -0,0 +1,4 @@ +let%expect_test "hello" = + print_endline Mylib.hello_world; + [%expect {| Hello, World! |}] +;; diff --git a/lib/mylib/test/test__mylib.mli b/test/mylib/test__mylib.mli similarity index 100% rename from lib/mylib/test/test__mylib.mli rename to test/mylib/test__mylib.mli diff --git a/test/myotherlib/dune b/test/myotherlib/dune new file mode 100644 index 0000000..763add7 --- /dev/null +++ b/test/myotherlib/dune @@ -0,0 +1,8 @@ +(library + (name myotherlib_test) + (package doc-experiment-docusaurus-tests) + (flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a) + (libraries myotherlib) + (inline_tests) + (preprocess + (pps ppx_expect))) diff --git a/test/myotherlib/test__myotherlib.ml b/test/myotherlib/test__myotherlib.ml new file mode 100644 index 0000000..c112dc3 --- /dev/null +++ b/test/myotherlib/test__myotherlib.ml @@ -0,0 +1,4 @@ +let%expect_test "hello" = + print_endline Myotherlib.hello_world; + [%expect {| Hello, World From My Other Lib! |}] +;; diff --git a/lib/myotherlib/test/test__myotherlib.mli b/test/myotherlib/test__myotherlib.mli similarity index 100% rename from lib/myotherlib/test/test__myotherlib.mli rename to test/myotherlib/test__myotherlib.mli diff --git a/third-party-license/README.md b/third-party-license/README.md new file mode 100644 index 0000000..fe6a497 --- /dev/null +++ b/third-party-license/README.md @@ -0,0 +1,48 @@ +# Third Party Licenses + +This project uses the following third-party GitHub Actions: + +--- + +## actions/checkout + +- Repository: https://github.com/actions/checkout +- License: MIT License + +See the [actions/checkout license](https://github.com/actions/checkout/blob/main/LICENSE) for full details. + +--- + +## actions/deploy-pages + +- Repository: https://github.com/actions/deploy-pages +- License: MIT License + +See the [actions/deploy-pages license](https://github.com/actions/deploy-pages/blob/main/LICENSE) for full details. + +--- + +## actions/setup-node + +- Repository: https://github.com/actions/setup-node +- License: MIT License + +See the [actions/setup-node license](https://github.com/actions/setup-node/blob/main/LICENSE) for full details. + +--- + +## actions/upload-pages-artifact + +- Repository: https://github.com/actions/upload-pages-artifact +- License: MIT License + +See the [actions/upload-pages-artifact license](https://github.com/actions/upload-pages-artifact/blob/main/LICENSE) for full details. + +--- + +## ocaml/setup-ocaml + +- Repository: https://github.com/ocaml/setup-ocaml +- License: MIT License + +See the [ocaml/setup-ocaml license](https://github.com/ocaml/setup-ocaml/blob/master/LICENSE) for full details. diff --git a/third-party-license/actions/checkout/LICENSE b/third-party-license/actions/checkout/LICENSE new file mode 100644 index 0000000..cfbc8bb --- /dev/null +++ b/third-party-license/actions/checkout/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 GitHub, Inc. and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/third-party-license/actions/deploy-pages/LICENSE b/third-party-license/actions/deploy-pages/LICENSE new file mode 100644 index 0000000..8c9e791 --- /dev/null +++ b/third-party-license/actions/deploy-pages/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/third-party-license/actions/setup-node/LICENSE b/third-party-license/actions/setup-node/LICENSE new file mode 100644 index 0000000..cfbc8bb --- /dev/null +++ b/third-party-license/actions/setup-node/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 GitHub, Inc. and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/third-party-license/actions/upload-pages-artifact/LICENSE b/third-party-license/actions/upload-pages-artifact/LICENSE new file mode 100644 index 0000000..ccc4ac8 --- /dev/null +++ b/third-party-license/actions/upload-pages-artifact/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/third-party-license/ocaml/setup-ocaml/LICENSE b/third-party-license/ocaml/setup-ocaml/LICENSE new file mode 100644 index 0000000..761ba84 --- /dev/null +++ b/third-party-license/ocaml/setup-ocaml/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Anil Madhavapeddy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.