-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathci.sh
More file actions
executable file
·34 lines (26 loc) · 1.11 KB
/
ci.sh
File metadata and controls
executable file
·34 lines (26 loc) · 1.11 KB
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
#!/bin/bash
set -e
set -o pipefail
set -o xtrace
luarocks --lua-version=5.1 install busted
luarocks --lua-version=5.1 install https://raw.githubusercontent.com/leafo/lapis/master/lapis-dev-1.rockspec
luarocks --lua-version=5.1 install moonscript
luarocks --lua-version=5.1 install date
luarocks --lua-version=5.1 install web_sanitize
luarocks --lua-version=5.1 install tableshape
luarocks --lua-version=5.1 install cmark
luarocks --lua-version=5.1 make
# start postgres
echo "fsync = off" >> /var/lib/postgres/data/postgresql.conf
echo "synchronous_commit = off" >> /var/lib/postgres/data/postgresql.conf
echo "full_page_writes = off" >> /var/lib/postgres/data/postgresql.conf
su postgres -c '/usr/bin/pg_ctl -s -D /var/lib/postgres/data start -w -t 120'
echo "return 'test'" > lapis_environment.lua
moonc schema.moon
moonc config.moon
moonc community
createdb -U postgres community_test
LAPIS_SHOW_QUERIES=1 /usr/local/openresty/luajit/bin/luajit -e 'require("schema").make_schema()'
cat $(which busted) | sed 's/\/usr\/bin\/lua5\.1/\/usr\/local\/openresty\/luajit\/bin\/luajit/' > busted
chmod +x busted
./busted -o utfTerminal