-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (22 loc) · 801 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (22 loc) · 801 Bytes
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
FROM openresty/openresty:noble AS base
USER root
WORKDIR /usr/src
RUN apt-get update
RUN apt-get install -y libssl-dev
FROM base AS build
COPY ./*.rockspec ./
COPY ./src ./src
RUN /usr/local/openresty/luajit/bin/luarocks make ./*.rockspec
FROM build AS test
RUN /usr/local/openresty/luajit/bin/luarocks install busted
RUN /usr/local/openresty/luajit/bin/luarocks install luacov
RUN /usr/local/openresty/luajit/bin/luarocks install cluacov
RUN /usr/local/openresty/luajit/bin/luarocks install require
RUN /usr/local/openresty/luajit/bin/luarocks install luacheck
COPY ./.luacov ./.luacov
COPY ./test ./test
COPY ./run_lua_tests.sh ./run_lua_tests.sh
RUN chmod +x ./run_lua_tests.sh
CMD ["bash", "-c", "./run_lua_tests.sh"]
FROM test AS lint
CMD ["bash", "-c", "luacheck --no-self -- ./src"]