-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_test.sh
executable file
·74 lines (59 loc) · 1.28 KB
/
run_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
if ! command -v gleam &> /dev/null; then
echo "Gleam not found"
exit 1
fi
# ---------------NODE--------------------
if ! command -v node &> /dev/null; then
echo "JS Node ✘ (not found)"
NODE=66
else
cat ./README.md | gleam test --target=javascript --runtime=node
NODE=$?
fi
# ----------------BUN-------------------
if ! command -v bun &> /dev/null; then
echo "JS Bun ✘ (not found)"
BUN=66
else
cat ./README.md | gleam test --target=javascript --runtime=bun
BUN=$?
fi
# ----------------DENO-------------------
if ! command -v deno &> /dev/null; then
echo "JS Deno ✘ (not found)"
DENO=66
else
cat ./README.md | gleam test --target=javascript --runtime=deno
DENO=$?
fi
# ----------------ERLANG-----------------
if ! command -v erl &> /dev/null; then
echo "Erlang BEAM ✘ (not found)"
ERLANG=66
else
cat ./README.md | gleam test --target=erlang
ERLANG=$?
fi
# ----------------RESULTS----------------
echo ''
if [ "$NODE" == 0 ]; then
echo "JS Node ✔"
else
echo "JS Node ✘ (test failed)"
fi
if [ "$BUN" == 0 ]; then
echo "JS Bun ✔"
else
echo "JS Bun ✘ (test failed)"
fi
if [ "$DENO" == 0 ]; then
echo "JS Deno ✔"
else
echo "JS Deno ✘ (test failed)"
fi
if [ "$ERLANG" == 0 ]; then
echo "Erlang BEAM ✔"
else
echo "Erlang BEAM ✘ (test failed)"
fi