Skip to content

Commit

Permalink
.github/workflows: use github actions for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
daurnimator committed Jan 27, 2021
1 parent b2f152d commit 426df81
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: ci

on: [push, pull_request]

jobs:
luacheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: lua-http
- uses: leafo/gh-actions-lua@v8.0.0
- uses: leafo/gh-actions-luarocks@v4.0.0
- name: install-tooling
run: luarocks install luacheck
- name: luacheck
run: |
cd lua-http
luacheck .
test:
runs-on: ubuntu-latest
strategy:
matrix:
luaVersion:
- "5.1"
- "5.2"
- "5.3"
- "5.4"
- luajit-2.0.5
- luajit-2.1.0-beta3
luaCompileFlags: [""]
zlib: ["", "lzlib", "lua-zlib"]
remove_compat53: [false]

exclude:
# lzlib doesn't support Lua 5.4+
- luaVersion: "5.4"
zlib: "lzlib"
include:
- luaVersion: "5.3"
luaCompileFlags: LUA_CFLAGS="-DLUA_INT_TYPE=LUA_INT_INT"
- luaVersion: "5.3"
remove_compat53: true

steps:
- uses: actions/checkout@v2
with:
path: lua-http
- uses: leafo/gh-actions-lua@v8.0.0
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@v4.0.0
- name: install-tooling
run: |
luarocks install luacov-coveralls
luarocks install busted
- name: install-dependencies
run: |
cd lua-http
luarocks install --only-deps http-scm-0.rockspec
- name: install-lzlib
if: matrix.zlib == 'lzlib'
run: luarocks install lzlib
- name: install-lua-zlib
if: matrix.zlib == 'lua-zlib'
run: luarocks install lua-zlib

- name: remove-compat53
if: matrix.remove_compat53
run: luarocks remove compat53

- name: test
run: |
cd lua-http
busted -c -o utfTerminal
- name: coveralls
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
cd lua-http
luacov-coveralls -v
typedlua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: lua-http
- uses: leafo/gh-actions-lua@v8.0.0
with:
luaVersion: "5.3" # tlc doesn't work with 5.4+
- uses: leafo/gh-actions-luarocks@v4.0.0
- name: install-tooling
run: luarocks install https://raw.githubusercontent.com/andremm/typedlua/master/typedlua-scm-1.rockspec
- name: install-dependencies
run: |
cd lua-http
luarocks install --only-deps http-scm-0.rockspec
- name: typedlua
run: |
cd lua-http
tlc -o /dev/null spec/require-all.lua
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Can be found at [https://daurnimator.github.io/lua-http/](https://daurnimator.gi

## Status

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

0 comments on commit 426df81

Please # to comment.