Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Cadey Ratio | 3ef4d6557e | |
Cadey Ratio | 448aab6781 | |
Cadey Ratio | a5cda0400b | |
Cadey Ratio | c6a03a8d57 | |
Cadey Ratio | e8e56dc1d1 | |
Cadey Ratio | 6be57f3199 | |
Cadey Ratio | 91faa7b5ef |
|
@ -0,0 +1,9 @@
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: "xena/lua:5.3"
|
||||||
|
commands:
|
||||||
|
- luarocks-5.3 install --only-deps ./ln-0.2.0-1.rockspec
|
||||||
|
- busted-5.3
|
|
@ -0,0 +1 @@
|
||||||
|
result
|
|
@ -0,0 +1,7 @@
|
||||||
|
run = (cmd) ->
|
||||||
|
status = os.execute cmd
|
||||||
|
unless status
|
||||||
|
error string.format "got nonzero exit status %d", status
|
||||||
|
|
||||||
|
run "./test.sh"
|
||||||
|
run "nix-build"
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs ? import <nixpkgs> { }, lua ? pkgs.lua5_3
|
||||||
|
, luaPackages ? pkgs.lua53Packages }:
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
with luaPackages;
|
||||||
|
|
||||||
|
buildLuarocksPackage {
|
||||||
|
pname = "ln";
|
||||||
|
version = "0.2.1-2";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://luarocks.org/ln-0.2.1-2.src.rock";
|
||||||
|
sha256 = "1hb1vw68w407y05nprp352c0di6iybz4gjdhc0p521cpif4l8i1l";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = [ lua dkjson ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://tulpa.dev/cadey/lua-ln";
|
||||||
|
description = "The natural log function";
|
||||||
|
license.fullName = "0bsd";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package = "ln"
|
||||||
|
version = "0.2.0-1"
|
||||||
|
source = {
|
||||||
|
url = "git+https://tulpa.dev/cadey/lua-ln",
|
||||||
|
tag = "v0.2.0"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
summary = "The natural log function",
|
||||||
|
homepage = "https://tulpa.dev/cadey/lua-ln",
|
||||||
|
license = "0bsd"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua ~> 5.3",
|
||||||
|
"dkjson"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
ln = "src/ln.lua"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package = "ln"
|
||||||
|
version = "0.2.1-1"
|
||||||
|
source = {
|
||||||
|
url = "git+https://tulpa.dev/cadey/lua-ln"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
homepage = "https://tulpa.dev/cadey/lua-ln",
|
||||||
|
license = "0bsd",
|
||||||
|
summary = "The natural log function"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua ~> 5.1",
|
||||||
|
"dkjson"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
ln = "src/ln.lua"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package = "ln"
|
||||||
|
version = "0.2.1-2"
|
||||||
|
source = {
|
||||||
|
url = "git+https://tulpa.dev/cadey/lua-ln"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
homepage = "https://tulpa.dev/cadey/lua-ln",
|
||||||
|
license = "0bsd",
|
||||||
|
summary = "The natural log function"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua",
|
||||||
|
"dkjson"
|
||||||
|
}
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
ln = "src/ln.lua"
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ description = {
|
||||||
summary = "The natural log function"
|
summary = "The natural log function"
|
||||||
}
|
}
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"lua ~> 5.3",
|
"lua ~> 5.1",
|
||||||
"dkjson"
|
"dkjson"
|
||||||
}
|
}
|
||||||
build = {
|
build = {
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
let lua = pkgs.lua5_3.withPackages (ps: with ps; [ dkjson ]);
|
||||||
|
|
||||||
|
in pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs;
|
||||||
|
with lua53Packages; [
|
||||||
|
luarocks-nix
|
||||||
|
lua
|
||||||
|
busted
|
||||||
|
moonscript
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
ln = require "ln"
|
||||||
|
|
||||||
|
describe "moonscript tests", ->
|
||||||
|
lgr = ln.default_logger
|
||||||
|
msg = ""
|
||||||
|
lgr.filters = {
|
||||||
|
(message) -> msg = message,
|
||||||
|
}
|
||||||
|
|
||||||
|
it "can log", ->
|
||||||
|
ln.log {foo: "bar"}
|
||||||
|
assert.truthy string.find msg, "foo=bar"
|
11
test.sh
11
test.sh
|
@ -1,3 +1,10 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
nix-shell -p lua5_1 -p lua51Packages.busted -p lua51Packages.moonscript --run "busted"
|
||||||
|
nix-shell -p lua5_2 -p lua52Packages.busted -p lua52Packages.moonscript --run "busted"
|
||||||
|
nix-shell -p lua5_3 -p lua53Packages.busted -p lua53Packages.moonscript --run "busted"
|
||||||
|
nix-shell -p luajit -p luajitPackages.busted -p luajitPackages.moonscript --run "busted"
|
||||||
|
|
||||||
busted --defer-print
|
|
||||||
|
|
Loading…
Reference in New Issue