mrrp
This commit is contained in:
parent
18e0963d89
commit
ea726ced89
6 changed files with 46 additions and 26 deletions
|
@ -11,11 +11,14 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
luacheck_errcheck:
|
luacheck_errcheck:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container: nickblah/lua:5.1-alpine
|
container: nickblah/lua:5.1-luarocks-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install C libraries
|
||||||
|
run: apk add build-base
|
||||||
|
|
||||||
- name: Install Luacheck
|
- name: Install Luacheck
|
||||||
run: luarocks install luacheck
|
run: luarocks install luacheck
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,14 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
busted_unit_test:
|
busted_unit_test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: docker
|
||||||
|
container: nickblah/lua:5.1-luarocks-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Lua
|
- name: Install C libraries
|
||||||
uses: leafo/setup-lua@v1
|
run: apk add build-base
|
||||||
with:
|
|
||||||
lua-version: '5.1'
|
|
||||||
|
|
||||||
- name: Install Busted
|
- name: Install Busted
|
||||||
run: luarocks install busted
|
run: luarocks install busted
|
||||||
|
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal 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
|
||||||
|
}
|
|
@ -9,10 +9,8 @@
|
||||||
outputs = { self, nixpkgs, ...}:
|
outputs = { self, nixpkgs, ...}:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit self; };
|
pkgs = import nixpkgs { inherit self; };
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
|
||||||
in {
|
in {
|
||||||
devShells = builtins.map(system:
|
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||||
${system}.default = pkgs.mkShell {
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
# Run CI/CD actions locally
|
# Run CI/CD actions locally
|
||||||
pkgs.act
|
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'
|
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"
|
echo "Run 'run_workflows' to run the workflows locally"
|
||||||
'';
|
'';
|
||||||
}
|
};
|
||||||
) ${supportedSystems};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -36,10 +36,4 @@ describe("sanitytest", function()
|
||||||
assert.is_true(true, "Truthiness: true should be true")
|
assert.is_true(true, "Truthiness: true should be true")
|
||||||
assert.is_false(false, "Truthiness: false should be false")
|
assert.is_false(false, "Truthiness: false should be false")
|
||||||
end)
|
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)
|
end)
|
Loading…
Add table
Reference in a new issue