Skip to content

Commit 634c1b5

Browse files
author
cattenlinger
committed
Fix test action
1 parent 348ef09 commit 634c1b5

1 file changed

Lines changed: 37 additions & 31 deletions

File tree

.github/workflows/test.yml

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,43 @@ name: Run tests
22

33
on:
44
push:
5-
branches: [ main, master, develop ]
5+
branches: [ 'github-action' ]
66
pull_request:
7-
branches: [ main, master, develop ]
7+
branches: [ 'github-action' ]
88

9-
jobs:
10-
test-lua51:
11-
runs-on: debian-latest
12-
steps:
13-
- uses: actions/checkout@v3
14-
- name: Install Lua 5.1
15-
run: |
16-
sudo apt-get update
17-
sudo apt-get install -y lua5.1 luarocks
18-
- name: Verify Lua version
19-
run: lua5.1 -v
20-
- name: Install busted
21-
run: luarocks install busted
22-
- name: Run tests
23-
run: lua5.1 tests.lua
9+
jobs:
10+
test-lua51:
11+
runs-on: ubuntu-slim
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Install Lua 5.1
15+
env: { DEBIAN_FRONTEND: noninteractive }
16+
run: |
17+
apt update
18+
apt install -y lua5.1 luarocks
19+
luarocks config lua_version 5.1
20+
- name: Verify Lua version
21+
run: |
22+
lua -e 'if not _VERSION:find("^Lua 5.1") then os.exit(1) end'
23+
- name: Install busted
24+
run: luarocks install busted
25+
- name: Run tests
26+
run: lua tests.lua
2427

25-
test-lua52:
26-
runs-on: debian-latest
27-
steps:
28-
- uses: actions/checkout@v3
29-
- name: Install Lua 5.2
30-
run: |
31-
sudo apt-get update
32-
sudo apt-get install -y lua5.2 luarocks
33-
- name: Verify Lua version
34-
run: lua5.2 -v
35-
- name: Install busted
36-
run: luarocks install busted
37-
- name: Run tests
38-
run: lua5.2 tests.lua
28+
test-lua52:
29+
runs-on: ubuntu-slim
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Install Lua 5.2
33+
env: { DEBIAN_FRONTEND: noninteractive }
34+
run: |
35+
apt update
36+
apt install -y lua5.2 liblua5.2-dev luarocks
37+
luarocks config lua_version 5.2
38+
- name: Verify Lua version
39+
run: |
40+
lua -e 'if not _VERSION:find("^Lua 5.2") then os.exit(1) end'
41+
- name: Install busted
42+
run: luarocks install busted
43+
- name: Run tests
44+
run: lua tests.lua

0 commit comments

Comments
 (0)