diff --git a/.forgejo/workflows/error_check.yml b/.forgejo/workflows/error_check.yml index 830eaf1..3781491 100644 --- a/.forgejo/workflows/error_check.yml +++ b/.forgejo/workflows/error_check.yml @@ -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 diff --git a/.forgejo/workflows/unit_test.yml b/.forgejo/workflows/unit_test.yml index d9da064..27a4d4e 100644 --- a/.forgejo/workflows/unit_test.yml +++ b/.forgejo/workflows/unit_test.yml @@ -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 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4e3c2b6 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix index dba1985..adbbbc9 100644 --- a/flake.nix +++ b/flake.nix @@ -9,19 +9,16 @@ outputs = { self, nixpkgs, ...}: let pkgs = import nixpkgs { inherit self; }; - supportedSystems = [ "x86_64-linux" ]; in { - devShells = builtins.map(system: - ${system}.default = pkgs.mkShell { - buildInputs = [ - # Run CI/CD actions locally - pkgs.act - ]; - shellHook = '' - 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}; - } + devShells.x86_64-linux.default = pkgs.mkShell { + buildInputs = [ + # Run CI/CD actions locally + pkgs.act + ]; + shellHook = '' + 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" + ''; + }; + }; } \ No newline at end of file diff --git a/tests/CORE/colors.lua b/tests/CORE/colors.lua deleted file mode 100644 index e69de29..0000000 diff --git a/tests/sanity.lua b/tests/sanity_spec.lua similarity index 85% rename from tests/sanity.lua rename to tests/sanity_spec.lua index adf7338..ed319cd 100644 --- a/tests/sanity.lua +++ b/tests/sanity_spec.lua @@ -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) \ No newline at end of file