Merge pull request #62 from idbrii/actions-busted
Run tests on gh actions
This commit is contained in:
commit
002fabb6bb
44
.github/workflows/runtest.yml
vendored
Normal file
44
.github/workflows/runtest.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: Validate Code
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- refactor
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- refactor
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
luaVersion: ["5.1.5", "luajit-2.0.5", "luajit-2.1.0-beta3"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Lua
|
||||
uses: leafo/gh-actions-lua@v8.0.0
|
||||
with:
|
||||
luaVersion: ${{ matrix.luaVersion }}
|
||||
- name: Setup Lua Rocks
|
||||
uses: leafo/gh-actions-luarocks@v4
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
luarocks --local install busted
|
||||
luarocks --local install luacov
|
||||
luarocks --local install luacov-coveralls
|
||||
- name: Run busted
|
||||
run: ~/.luarocks/bin/busted --verbose --coverage spec
|
||||
- name: Upload coverage
|
||||
continue-on-error: true # don't know why coveralls isn't uploading. For now, let this fail.
|
||||
run: |
|
||||
# ignore dotfile directories created by lua setup
|
||||
~/.luarocks/bin/luacov-coveralls --exclude '^%.%a+$' --repo-token WcsY9jsU97Zt0ZIbGHJftGkC8DsD16FVl
|
||||
# - name: Run luacheck
|
||||
# run: luacheck --std max+busted *.lua spec
|
||||
|
39
.travis.yml
39
.travis.yml
@ -1,39 +0,0 @@
|
||||
# http://kiki.to/blog/2016/02/04/talk-continuous-integration-with-lua/
|
||||
language: python
|
||||
sudo: false
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- refactor
|
||||
|
||||
env:
|
||||
- LUA="lua=5.1"
|
||||
- LUA="luajit=2.0"
|
||||
- LUA="luajit=2.1"
|
||||
|
||||
before_install:
|
||||
- pip install hererocks
|
||||
- hererocks lua_install -r^ --$LUA
|
||||
- export PATH=$PATH:$PWD/lua_install/bin
|
||||
|
||||
install:
|
||||
#- luarocks install luacheck
|
||||
- luarocks install busted
|
||||
- luarocks install luacov
|
||||
- luarocks install luacov-coveralls
|
||||
|
||||
script:
|
||||
#- luacheck --std max+busted *.lua spec
|
||||
- busted --verbose --coverage spec
|
||||
|
||||
after_success:
|
||||
- luacov-coveralls -e $TRAVIS_BUILD_DIR/lua_install
|
||||
|
||||
notifications:
|
||||
irc: "irc.oftc.net#excessive"
|
||||
recipients:
|
||||
- shakesoda+travis@gmail.com
|
||||
email:
|
||||
on_success: change
|
||||
on_failure: always
|
Loading…
x
Reference in New Issue
Block a user