Skip to content

Commit

Permalink
chore(tests): Skip tests requiring optional dependencies not compatib…
Browse files Browse the repository at this point in the history
…le with Lua 5.4
  • Loading branch information
alerque committed Dec 12, 2023
1 parent e4213db commit dd39eda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/busted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
luarocks install busted
luarocks install dkjson
luarocks install inifile
luarocks install yaml
${{ matrix.luaVersion != '5.4' && 'luarocks install yaml' || '' }} # https://github.com/lubyk/yaml/issues/7
- name: Replace system cliargs with self
run: |
Expand Down
11 changes: 8 additions & 3 deletions spec/config_loader_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ describe("cliargs.config_loader", function()
end)

describe('#from_yaml', function()
it('works', function()
args, err = cli:parse({ '--config', 'spec/fixtures/config.yml' })
end)
-- Because it isn't easy to install on Lua 5.4, some environments can't run this test
-- https://github.com/lubyk/yaml/issues/7
local hasyaml = pcall(require, "yaml")
if hasyaml then
it('works', function()
args, err = cli:parse({ '--config', 'spec/fixtures/config.yml' })
end)
end
end)

describe('#from_lua', function()
Expand Down

0 comments on commit dd39eda

Please sign in to comment.