Skip to content

Commit

Permalink
chore(ci) update to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Aug 22, 2022
1 parent 68c468e commit c6475a7
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 45 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: leafo/gh-actions-lua@v8
with:
luaVersion: "5.4"

- uses: leafo/gh-actions-luarocks@v4

- name: dependencies
run: |
luarocks install luacheck
- name: lint
run: |
luacheck .
43 changes: 43 additions & 0 deletions .github/workflows/unix_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Unix build"

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit-2.1.0-beta3", "luajit-openresty"]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: leafo/gh-actions-lua@v8
with:
luaVersion: ${{ matrix.luaVersion }}

- uses: leafo/gh-actions-luarocks@v4

- name: test dependencies
run: |
luarocks install luasocket
luarocks install busted
luarocks install luacov-coveralls
- name: install
run: |
luarocks make
- name: test
run: |
busted --lpath="" --cpath="" --coverage --Xoutput "--color"
- name: Report test coverage
if: success()
continue-on-error: true
run: luacov-coveralls
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}
26 changes: 14 additions & 12 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
std = "ngx_lua+busted"
unused_args = false
redefined = false
max_line_length = false


globals = {
--"_KONG",
--"kong",
--"ngx.IS_CLI",
"ngx",
}


not_globals = {
-- deprecated Lua 5.0 functions
"string.len",
"table.getn",
}


ignore = {
--"6.", -- ignore whitespace warnings
include_files = {
"**/*.lua",
"*.rockspec",
".busted",
".luacheckrc",
}

files["spec/**/*.lua"] = {
std = "+busted",
}

exclude_files = {
"here/**"
--"spec/fixtures/invalid-module.lua",
--"spec-old-api/fixtures/invalid-module.lua",
-- The Github Actions Lua Environment
".lua",
".luarocks",
".install",
}

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.com/Tieske/timerwheel.lua.svg?branch=master)](https://travis-ci.com/Tieske/timerwheel.lua)
[![Coverage Status](https://coveralls.io/repos/github/Tieske/timerwheel.lua/badge.svg?branch=master)](https://coveralls.io/github/Tieske/timerwheel.lua?branch=master)
[![Unix build](https://img.shields.io/github/workflow/status/Tieske/timerwheel.lua/Unix%20build?label=Unix%20build&logo=linux)](https://github.com/Tieske/timerwheel.lua/actions/workflows/unix_build.yml)
[![Coveralls code coverage](https://img.shields.io/coveralls/github/Tieske/timerwheel.lua?logo=coveralls)](https://coveralls.io/github/Tieske/timerwheel.lua)
[![Lint](https://github.com/Tieske/timerwheel.lua/workflows/Lint/badge.svg)](https://github.com/Tieske/timerwheel.lua/actions/workflows/lint.yml)


timerwheel.lua
Expand Down

0 comments on commit c6475a7

Please sign in to comment.