This commit is contained in:
Mrrp 2024-12-10 16:26:49 -08:00
parent 18e0963d89
commit ea726ced89
6 changed files with 46 additions and 26 deletions

View file

@ -11,11 +11,14 @@ on:
jobs:
luacheck_errcheck:
runs-on: docker
container: nickblah/lua:5.1-alpine
container: nickblah/lua:5.1-luarocks-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install C libraries
run: apk add build-base
- name: Install Luacheck
run: luarocks install luacheck

View file

@ -10,15 +10,14 @@ on:
jobs:
busted_unit_test:
runs-on: ubuntu-latest
runs-on: docker
container: nickblah/lua:5.1-luarocks-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Lua
uses: leafo/setup-lua@v1
with:
lua-version: '5.1'
- name: Install C libraries
run: apk add build-base
- name: Install Busted
run: luarocks install busted

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1733550349,
"narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -9,10 +9,8 @@
outputs = { self, nixpkgs, ...}:
let
pkgs = import nixpkgs { inherit self; };
supportedSystems = [ "x86_64-linux" ];
in {
devShells = builtins.map(system:
${system}.default = pkgs.mkShell {
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = [
# Run CI/CD actions locally
pkgs.act
@ -21,7 +19,6 @@
alias run_workflows='act -W $PWD/.forgejo/workflows -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --pull=false'
echo "Run 'run_workflows' to run the workflows locally"
'';
}
) ${supportedSystems};
}
};
};
}

View file

View file

@ -36,10 +36,4 @@ describe("sanitytest", function()
assert.is_true(true, "Truthiness: true should be true")
assert.is_false(false, "Truthiness: false should be false")
end)
it("tests properties", function()
assert.has_property({a = 1, b = 2}, "a", "Properties: table should have property a")
assert.has_no_property({a = 1, b = 2}, "c", "Properties: table should not have property c")
end)
end)