Skip to content

Commit d4da3e1

Browse files
Add unit tests via tested in CI (#17)
Added 'tested' dependency installation and unit test execution step.
1 parent 663e319 commit d4da3e1

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/test-and-coverage.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ jobs:
99
test:
1010
runs-on: ubuntu-latest
1111
strategy:
12+
fail-fast: false
1213
matrix:
13-
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, lua=5.5, luajit=@v2.0, luajit=@v2.1]
14+
# TODO: re-add lua=5.5 once argparse has been updated
15+
lua: [lua=5.1, lua=5.2, lua=5.3, lua=5.4, luajit=@v2.0, luajit=@v2.1]
1416
steps:
1517
# Checks-out the repository under $GITHUB_WORKSPACE.
1618
- uses: actions/checkout@v6
@@ -34,12 +36,17 @@ jobs:
3436
run: |
3537
luarocks install lua-cjson
3638
luarocks install luacov
39+
luarocks install tested
3740
luarocks install luacov-coveralls
3841
3942
- name: run toml-test with coverage
4043
continue-on-error: true
4144
run: |
4245
toml-test test -parallel 1 -toml=1.1 -decoder="lua_install/bin/lua -lluacov spec/decoder.lua" -encoder="lua_install/bin/lua -lluacov spec/encoder.lua"
46+
47+
- name: Run unit tests
48+
run: |
49+
tested -c
4350
4451
- name: Report test coverage
4552
if: success()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ local_date = 1979-05-27]]
4141

4242
end)
4343

44-
return tested
44+
return tested
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ tested.test("slightly above max nesting depth", function()
5151
tested.assert({given="edge of nesting", should="does not raise an error", expected=true, actual=ok})
5252
end)
5353

54-
return tested
54+
return tested

0 commit comments

Comments
 (0)