Skip to content

feat: some adjustments to builtin functions (#162) #328

feat: some adjustments to builtin functions (#162)

feat: some adjustments to builtin functions (#162) #328

Workflow file for this run

name: build
on:
push:
branches:
- master
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
lua-version: ["5.1", "5.2", "5.3", "5.4", "luajit-openresty"]
name: Lua ${{ matrix.lua-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Lua ${{ matrix.lua-version }}
uses: leafo/gh-actions-lua@v10.0.0
with:
luaVersion: ${{ matrix.lua-version }}
- name: Set up luarocks
uses: leafo/gh-actions-luarocks@v4.0.0
- name: Install PCRE
run: |
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
- name: Install dependencies
run: |
until luarocks install lualogging
do
sleep 1
done
until luarocks install busted
do
sleep 1
done
until luarocks install busted-htest
do
sleep 1
done
until luarocks install cluacov
do
sleep 1
done
until luarocks install luacheck
do
sleep 1
done
until luarocks install luacov-coveralls
do
sleep 1
done
until luarocks install lrexlib-pcre
do
sleep 1
done
until luarocks install luaposix
do
sleep 1
done
if [ ! -f lua_install/bin/luacheck ]; then luarocks install luacheck; fi
- name: Lint with Luacheck
run: luacheck .
- name: Run tests
run: busted tests -o htest
- name: Reporting test coverage
run: |
busted tests -c -v
luacov-coveralls -i src -e .luarocks
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
benchmark:
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: Benchmark
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up LuaJIT
uses: leafo/gh-actions-lua@v10.0.0
with:
luaVersion: "luajit-openresty"
- name: Set up luarocks
uses: leafo/gh-actions-luarocks@v4.0.0
- name: Install PCRE
run: |
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
- name: Install dependencies
run: |
luarocks install lualogging
luarocks install lrexlib-pcre
luarocks install luaposix
luarocks install luasocket
luarocks install busted
luarocks install busted-htest
- name: Run Benchmark
run: |
busted bench.lua -o htest