Skip to content

Commit 853fb92

Browse files
committed
makefile: decompose deps installation
Since it will be more convenient to see CI jobs making its own work, the installation of rocks was rewriten to install rocks only for one task.
1 parent d31d99a commit 853fb92

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,24 @@ coveralls: $(LUACOV_STATS)
5151
echo "Send code coverage data to the coveralls.io service"
5252
luacov-coveralls --include ^roles --verbose --repo-token ${GITHUB_TOKEN}
5353

54-
deps:
54+
deps-test:
5555
tt rocks install luatest 1.0.1
56-
tt rocks install luacheck 0.26.0
56+
57+
deps-coverage: deps-test
5758
tt rocks install luacov 0.13.0-1
5859
tt rocks install luacov-coveralls 0.2.3-1 --server=http://luarocks.org
60+
61+
deps-lint:
62+
tt rocks install luacheck 0.26.0
63+
64+
deps:
65+
ifeq ($(depname), test)
66+
$(MAKE) deps-test
67+
else ifeq ($(depname), coverage)
68+
$(MAKE) deps-coverage
69+
else ifeq ($(depname), lint)
70+
$(MAKE) deps-lint
71+
else
72+
$(MAKE) deps-coverage deps-lint
73+
endif
5974
tt rocks make

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,32 @@ git clone https://github.com/tarantool/metrics-export-role
206206
cd metrics-export-role
207207
```
208208

209-
After that you need to install dependencies (`tt` is required):
209+
After that you need to install dependencies (`tt` is required).
210+
To do it, run:
210211

211212
```shell
212213
make deps
213214
```
214215

216+
It's possible to install requirements only for running tests
217+
or linter check. To install only tests requirements, run:
218+
219+
```shell
220+
make deps depname=test
221+
```
222+
223+
To install tests with coverage requirements, run:
224+
225+
```shell
226+
make deps depname=coverage
227+
```
228+
229+
To install linter checks, run:
230+
231+
```shell
232+
make deps depname=lint
233+
```
234+
215235
At this point you could run tests (`tarantool` 3 is required):
216236

217237
```shell

0 commit comments

Comments
 (0)