Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Luacheck and travis.yml with install-config #80

Merged
merged 1 commit into from
Nov 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[travis.yml] added install-script & luacheck install command in travis.
#77

- added travis.yml with dependencies installation script.
- added luacheck test command in runtests script.
- fixed accessing undefined variable `uci` warning

Fixes #77
  • Loading branch information
vishalx360 committed Nov 11, 2018
commit 83a377d5ce1e64ffc026b4e18ebd17fd68c16416
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# .travis.yml
language: python
sudo: true
env:
- LUA="lua=5.1.5"
before_install:
- sudo ./install-dev.sh

install:
vishalx360 marked this conversation as resolved.
Show resolved Hide resolved
- sudo luarocks install luacheck

script:
- ./runtests
2 changes: 1 addition & 1 deletion openwisp-config/tests/test_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package.path = package.path .. ';../files/lib/?.lua'
require('os')
require('io')
require('uci')
uci = require('uci')
local utils = require('openwisp.utils')
luaunit = require('luaunit')
write_dir = './utils'
Expand Down
1 change: 1 addition & 0 deletions runtests
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
cd openwisp-config/tests/
luacheck . -d -a -r
lua test_store_unmanaged.lua -v
lua test_restore_unmanaged.lua -v
lua test_uci_autoname.lua -v
Expand Down