Skip to content

Commit bf4932f

Browse files
committed
Add CI workflow
1 parent d890304 commit bf4932f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
env:
11+
LUA_VERSION: "5.4.7"
12+
13+
jobs:
14+
tests:
15+
runs-on: ubuntu-latest
16+
container:
17+
image: pandoc/core:3.7.0.2
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Verify pandoc installation
24+
run: |
25+
pandoc --version
26+
27+
- name: Ensure pandoc supports dynamic loading of C libraries
28+
run: |
29+
ldd $(which pandoc)
30+
31+
- name: Install lua
32+
run: |
33+
cd /tmp
34+
curl -R -O https://www.lua.org/ftp/lua-${{ env.LUA_VERSION }}.tar.gz
35+
tar zxf lua-${{ env.LUA_VERSION }}.tar.gz
36+
cd lua-${{ env.LUA_VERSION }}
37+
make linux
38+
sudo make install
39+
40+
- name: Install luarocks
41+
run: |
42+
cd /tmp
43+
git clone https://github.com/luarocks/luarocks.git
44+
cd luarocks
45+
./configure --lua-version=5.4 \
46+
--with-lua=/usr/local \
47+
--prefix=/usr/local
48+
make
49+
sudo make install
50+
51+
- name: Install luarocks modules
52+
run: |
53+
luarocks config local_by_default true
54+
luarocks install busted
55+
luarocks install luacov
56+
luarocks install cluacov
57+
luarocks install ansicolors
58+
59+
- name: Run tests
60+
run: |
61+
./test.lua

0 commit comments

Comments
 (0)