Skip to content

Commit 10033fb

Browse files
committed
.github/workflows: use github actions for CI
1 parent b2f152d commit 10033fb

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

.github/workflows/ci.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: ci
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches: [ $default-branch ]
7+
8+
jobs:
9+
luacheck:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
path: lua-http
15+
- uses: leafo/gh-actions-lua@v8.0.0
16+
- uses: leafo/gh-actions-luarocks@v4.0.0
17+
- name: install-tooling
18+
run: luarocks install luacheck
19+
- name: luacheck
20+
run: |
21+
cd lua-http
22+
luacheck .
23+
24+
test:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
luaVersion:
29+
- "5.1"
30+
- "5.2"
31+
- "5.3"
32+
- "5.4"
33+
- luajit-2.0.5
34+
- luajit-2.1.0-beta3
35+
luaCompileFlags: [""]
36+
zlib: ["", "lzlib", "lua-zlib"]
37+
remove_compat53: [false]
38+
39+
exclude:
40+
# lzlib doesn't support Lua 5.4+
41+
- luaVersion: "5.4"
42+
zlib: "lzlib"
43+
include:
44+
- luaVersion: "5.3"
45+
luaCompileFlags: LUA_CFLAGS="-DLUA_INT_TYPE=LUA_INT_INT"
46+
- luaVersion: "5.3"
47+
remove_compat53: true
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
path: lua-http
53+
- uses: leafo/gh-actions-lua@v8.0.0
54+
with:
55+
luaVersion: ${{ matrix.luaVersion }}
56+
- uses: leafo/gh-actions-luarocks@v4.0.0
57+
- name: install-tooling
58+
run: |
59+
luarocks install luacov-coveralls
60+
luarocks install busted
61+
- name: install-dependencies
62+
run: |
63+
cd lua-http
64+
luarocks install --only-deps http-scm-0.rockspec
65+
66+
- name: install-lzlib
67+
if: matrix.zlib == 'lzlib'
68+
run: luarocks install lzlib
69+
- name: install-lua-zlib
70+
if: matrix.zlib == 'lua-zlib'
71+
run: luarocks install lua-zlib
72+
73+
- name: remove-compat53
74+
if: matrix.remove_compat53
75+
run: luarocks remove compat53
76+
77+
- name: test
78+
run: |
79+
cd lua-http
80+
busted -c -o utfTerminal
81+
82+
- name: coveralls
83+
continue-on-error: true
84+
env:
85+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
86+
run: |
87+
cd lua-http
88+
luacov-coveralls -v
89+
90+
typedlua:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: actions/checkout@v2
94+
with:
95+
path: lua-http
96+
- uses: leafo/gh-actions-lua@v8.0.0
97+
with:
98+
luaVersion: "5.3" # tlc doesn't work with 5.4+
99+
- uses: leafo/gh-actions-luarocks@v4.0.0
100+
- name: install-tooling
101+
run: luarocks install https://raw.githubusercontent.com/andremm/typedlua/master/typedlua-scm-1.rockspec
102+
- name: install-dependencies
103+
run: |
104+
cd lua-http
105+
luarocks install --only-deps http-scm-0.rockspec
106+
- name: typedlua
107+
run: |
108+
cd lua-http
109+
tlc -o /dev/null spec/require-all.lua

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Can be found at [https://daurnimator.github.io/lua-http/](https://daurnimator.gi
1717

1818
## Status
1919

20+
![Build Status](https://github.com/daurnimator/lua-http/workflows/ci/badge.svg)
2021
[![Build Status](https://travis-ci.org/daurnimator/lua-http.svg)](https://travis-ci.org/daurnimator/lua-http)
2122
[![Coverage Status](https://coveralls.io/repos/daurnimator/lua-http/badge.svg?branch=master&service=github)](https://coveralls.io/github/daurnimator/lua-http?branch=master)
2223
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/108/badge)](https://bestpractices.coreinfrastructure.org/projects/108)

0 commit comments

Comments
 (0)