Skip to content

Commit 058931a

Browse files
committed
fix luarocks error
1 parent ad3ab60 commit 058931a

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v4
3636
- name: Install deps
3737
run: |
38-
apk add --no-cache curl perl bash wget git perl-dev libarchive-tools nodejs
38+
apk add --no-cache curl perl bash wget git perl-dev libarchive-tools nodejs build-base
3939
ln -s /usr/bin/bsdtar /usr/bin/tar
4040
4141
- name: Install CPAN
@@ -52,17 +52,28 @@ jobs:
5252
- name: Install Test::Nginx
5353
run: cpanm -q -n Test::Nginx
5454

55-
- uses: leafo/gh-actions-luarocks@v5
56-
with:
57-
luarocksVersion: "3.12.2"
55+
- name: Install latest LuaRocks
56+
run: |
57+
# Remove old luarocks if exists
58+
rm -rf /usr/local/openresty/luajit/bin/luarocks* || true
59+
# Download and install latest LuaRocks
60+
cd /tmp
61+
wget https://luarocks.org/releases/luarocks-3.11.1.tar.gz
62+
tar zxpf luarocks-3.11.1.tar.gz
63+
cd luarocks-3.11.1
64+
./configure --prefix=/usr/local/openresty/luajit \
65+
--with-lua=/usr/local/openresty/luajit \
66+
--lua-suffix=jit \
67+
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1
68+
make build && make install
5869
5970
- name: Install Luacov
60-
run:
71+
run: |
72+
# Clear any existing cache
73+
rm -rf ~/.cache/luarocks || true
6174
/usr/local/openresty/luajit/bin/luarocks install luacov
6275
/usr/local/openresty/luajit/bin/luarocks install lua-resty-openssl
6376
64-
- uses: actions/checkout@v4
65-
6677
- name: Run tests
6778
run: make coverage
6879

0 commit comments

Comments
 (0)