Skip to content

Commit 77add12

Browse files
committed
add testing steps to GitHub Actions and update dependencies in opam.export
1 parent b67eac2 commit 77add12

File tree

4 files changed

+45
-11
lines changed

4 files changed

+45
-11
lines changed

.github/workflows/deploy-branches.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,19 @@ jobs:
5656
git status
5757
git diff-index --quiet HEAD || (git commit -m "github-deploy-action-${BRANCH_NAME}"; git push)
5858
working-directory: ./server
59+
- name: Run Tests
60+
id: test
61+
run: |
62+
eval $(opam env)
63+
make test
64+
working-directory: ./source
65+
timeout-minutes: 10
66+
- name: Test Report
67+
uses: dorny/test-reporter@v1
68+
with:
69+
name: Test Report
70+
path: ./_build/default/test/junit_tests*.xml
71+
reporter: java-junit
72+
fail-on-error: true
73+
fail-on-empty: true # Use an empty test report to detect when something failed with the test runner
74+
working-directory: ./source

opam.export

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
opam-version: "2.0"
2-
compiler: ["ocaml-base-compiler.5.0.0"]
2+
compiler: [
3+
"base-bigarray.base"
4+
"base-domains.base"
5+
"base-nnp.base"
6+
"base-threads.base"
7+
"base-unix.base"
8+
"ocaml.5.0.0"
9+
"ocaml-base-compiler.5.0.0"
10+
"ocaml-config.3"
11+
"ocaml-options-vanilla.1"
12+
]
313
roots: [
4-
"alcotest.1.7.0"
14+
"alcotest.1.8.0"
515
"dune.3.17.2"
616
"fmt.0.9.0"
717
"incr_dom.v0.16.0"
8-
"js_of_ocaml.5.7.2"
9-
"js_of_ocaml-ppx.5.7.2"
18+
"js_of_ocaml.5.9.1"
19+
"js_of_ocaml-ppx.5.9.1"
20+
"junit_alcotest.2.2.0"
1021
"ocaml-base-compiler.5.0.0"
1122
"ocaml-lsp-server.1.17.0"
1223
"ppx_blob.0.8.0"
@@ -22,7 +33,7 @@ roots: [
2233
]
2334
installed: [
2435
"abstract_algebra.v0.16.0"
25-
"alcotest.1.7.0"
36+
"alcotest.1.8.0"
2637
"angstrom.0.16.0"
2738
"astring.0.8.5"
2839
"async_js.v0.16.0"
@@ -71,11 +82,13 @@ installed: [
7182
"int_repr.v0.16.0"
7283
"jane-street-headers.v0.16.0"
7384
"janestreet_lru_cache.v0.16.1"
74-
"js_of_ocaml.5.7.2"
75-
"js_of_ocaml-compiler.5.7.2"
76-
"js_of_ocaml-ppx.5.7.2"
85+
"js_of_ocaml.5.9.1"
86+
"js_of_ocaml-compiler.5.9.1"
87+
"js_of_ocaml-ppx.5.9.1"
7788
"js_of_ocaml_patches.v0.16.0"
7889
"jst-config.v0.16.0"
90+
"junit.2.2.0"
91+
"junit_alcotest.2.2.0"
7992
"lambda-term.3.3.2"
8093
"lambdasoup.1.0.0"
8194
"logs.0.7.0"
@@ -154,12 +167,13 @@ installed: [
154167
"ppx_yojson_conv_lib.v0.16.0"
155168
"ppxlib.0.32.0"
156169
"protocol_version_header.v0.16.0"
170+
"ptime.1.2.0"
157171
"ptmap.2.0.5"
158172
"re.1.11.0"
159173
"react.1.2.2"
160174
"reason.3.11.0"
161175
"result.1.5"
162-
"sedlex.3.2"
176+
"sedlex.3.4"
163177
"seq.base"
164178
"sexplib.v0.16.0"
165179
"sexplib0.v0.16.0"

test/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
(modules test_suite)
44
(libraries
55
alcotest
6+
junit_alcotest
67
stds
78
tylr_core
89
tylr_hazel))

test/test_suite.re

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
open Alcotest;
22
open Stds;
33
open Tylr_core;
4+
open Junit_alcotest;
45

56
module State = {
67
type t = (Path.Cursor.t, string);
@@ -111,6 +112,8 @@ let modify_tests = (
111112
],
112113
);
113114

114-
let () = {
115-
run("tylr", [move_tests, tab_tests, modify_tests]);
115+
let (suite, _) = {
116+
run_and_report("tylr", [move_tests, tab_tests, modify_tests]);
116117
};
118+
119+
Junit.to_file(Junit.make([suite]), "junit_tests.xml");

0 commit comments

Comments
 (0)