Skip to content

Commit fc5e7de

Browse files
liguriorosik
authored andcommitted
ci: run luatest, luacov and luacheck using cmake
In a project we run everything using cmake: luacov, luacheck, luatest. Running same tools directly in CI duplicates code a bit and increases the likelihood of error in passed options. These are a reasons why I switched it to using cmake.
1 parent 993cc8c commit fc5e7de

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ jobs:
2424
id: cache-rocks
2525
with:
2626
path: .rocks/
27-
key: cache-rocks-${{ matrix.runs-on }}-04
27+
key: cache-rocks-${{ matrix.runs-on }}-05
2828
-
2929
run: tarantoolctl rocks install luacheck
3030
if: steps.cache-rocks.outputs.cache-hit != 'true'
3131
-
3232
run: tarantoolctl rocks install luatest
3333
if: steps.cache-rocks.outputs.cache-hit != 'true'
34+
-
35+
run: tarantoolctl rocks install luacov
36+
if: steps.cache-rocks.outputs.cache-hit != 'true'
3437
- run: echo $PWD/.rocks/bin >> $GITHUB_PATH
3538

3639
- run: tarantoolctl rocks list
@@ -39,9 +42,14 @@ jobs:
3942
CMAKE_DUMMY_WEBUI: true
4043
- run: tarantoolctl rocks remove ddl --force
4144

42-
- run: luacheck .
4345
- run: tarantoolctl rocks make
44-
- run: luatest -v
46+
- run: cmake -S . -B build
47+
48+
- name: Run luacheck
49+
run: make -C build luacheck
50+
51+
- name: Run tests and code coverage analysis
52+
run: make -C build coverage
4553

4654
# Cleanup cached paths
4755
- run: tarantoolctl rocks remove cartridge

0 commit comments

Comments
 (0)