forked from leafo/pgmoon
-
Notifications
You must be signed in to change notification settings - Fork 1
155 lines (121 loc) · 3.52 KB
/
test.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: "test"
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgresVersion: ["13", "14"]
luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit-openresty"]
env:
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: 127.0.0.1
DOCKER_POSTGRES_VERSION: ${{ matrix.postgresVersion }}
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-lua@master
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@master
- name: dependencies
run: |
luarocks install busted
luarocks install luasocket
luarocks install luasec
luarocks install moonscript
luarocks install https://raw.githubusercontent.com/leafo/lua-cjson/master/lua-cjson-dev-1.rockspec
luarocks install luaossl
luarocks install cqueues
[[ "${{ matrix.luaVersion }}" =~ ^5\.[12]$ ]] && luarocks install luabitop || true
- name: build
run: |
luarocks make
- name: test
run: |
busted -o utfTerminal
test_resty:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgresVersion: ["14"]
env:
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: 127.0.0.1
DOCKER_POSTGRES_VERSION: ${{ matrix.postgresVersion }}
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-openresty@main
with:
openrestyVersion: "1.19.9.1"
- uses: leafo/gh-actions-luarocks@master
with:
withLuaPath: "/usr/local/openresty/luajit/"
- name: dependencies
run: |
luarocks install busted
luarocks install moonscript
luarocks install https://raw.githubusercontent.com/leafo/lua-cjson/master/lua-cjson-dev-1.rockspec
luarocks install lua-resty-openssl
- name: build
run: |
luarocks make
- name: test
run: |
resty spec/resty_busted.lua
test_redbean:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgresVersion: ["13"]
luaVersion: ["5.4"]
env:
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: 127.0.0.1
DOCKER_POSTGRES_VERSION: ${{ matrix.postgresVersion }}
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-lua@master
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@master
- name: dependencies
run: |
luarocks install moonscript --dev
luarocks install busted
luarocks path
- name: build
run: |
#luarocks make
moonc spec
mkdir redbean-pgmoon
- name: Clone Propagram/pgmoon
uses: actions/checkout@master
with:
repository: Propagram/pgmoon
path: redbean-pgmoon/pgmoon
- name: install
working-directory: redbean-pgmoon
run: |
sudo apt install zip curl
curl https://redbean.dev/redbean-latest.com >redbean.com
chmod +x redbean.com
sh ./redbean.com --assimilate
moonc pgmoon
mv pgmoon .lua
zip -r redbean.com .lua
rm -r .lua
mv /home/runner/work/pgmoon/pgmoon/.luarocks/share/lua/5.4 .lua
zip -u -r redbean.com .lua
rm -r .lua
mv /home/runner/work/pgmoon/pgmoon/.luarocks/lib/lua/5.4 .lua
zip -u -r redbean.com .lua
- name: test
working-directory: redbean-pgmoon
run: |
./redbean.com -i ../spec/pgmoon_spec.lua